暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

cloudlogging.js 886B

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;