Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

12345678910111213141516171819202122232425
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.listEntries = void 0;
  4. const api_1 = require("../api");
  5. const apiv2_1 = require("../apiv2");
  6. const error_1 = require("../error");
  7. const API_VERSION = "v2";
  8. async function listEntries(projectId, filter, pageSize, order) {
  9. const client = new apiv2_1.Client({ urlPrefix: api_1.cloudloggingOrigin, apiVersion: API_VERSION });
  10. try {
  11. const result = await client.post("/entries:list", {
  12. resourceNames: [`projects/${projectId}`],
  13. filter: filter,
  14. orderBy: `timestamp ${order}`,
  15. pageSize: pageSize,
  16. });
  17. return result.body.entries;
  18. }
  19. catch (err) {
  20. throw new error_1.FirebaseError("Failed to retrieve log entries from Google Cloud.", {
  21. original: err,
  22. });
  23. }
  24. }
  25. exports.listEntries = listEntries;