Log: {
    createLogApiKey(keyName: string): Promise<LogApiKey>;
    deleteLogApiKey(keyId: string): Promise<LogApiKey>;
    deleteLogApiKeys(): Promise<LogApiKey[]>;
    fetch(source: string, startTs: string, endTs: string, cookie: string): Promise<PagedResult<LogEventSkeleton>>;
    getDefaultNoiseFilter(): string[];
    getLogApiKey(keyId: string): Promise<LogApiKey>;
    getLogApiKeys(): Promise<LogApiKey[]>;
    getLogSources(): Promise<string[]>;
    isLogApiKeyValid(keyId: string, secret: string): Promise<boolean>;
    resolveLevel(level: string | number): string[];
    resolvePayloadLevel(log: LogEventSkeleton): string;
    tail(source: string, cookie: string): Promise<PagedResult<LogEventSkeleton>>;
}

Type declaration

  • createLogApiKey:function
    • Create log api key

      Parameters

      • keyName: string

        human-readable key name

      Returns Promise<LogApiKey>

      a promise resolving to an object containing the log api key and secret

  • deleteLogApiKey:function
    • Delete log api key

      Parameters

      • keyId: string

        key id

      Returns Promise<LogApiKey>

      a promise resolving to an object containing the log api key

  • deleteLogApiKeys:function
  • fetch:function
    • Fetch logs

      Parameters

      • source: string

        log source(s) to tail

      • startTs: string

        start timestamp

      • endTs: string

        end timestamp

      • cookie: string

        paged results cookie

      Returns Promise<PagedResult<LogEventSkeleton>>

      promise resolving to paged log event result

  • getDefaultNoiseFilter:function
    • Get default noise filter

      Returns string[]

      array of default event types and loggers to be filtered out

  • getLogApiKey:function
  • getLogApiKeys:function
  • getLogSources:function
    • Get available log sources

      Returns Promise<string[]>

      promise resolving to an array of available log sources

  • isLogApiKeyValid:function
    • Validate log api key and secret

      Parameters

      • keyId: string

        log api key id

      • secret: string

        log api secret

      Returns Promise<boolean>

      a promise resolving to true if the key is valid, false otherwise

  • resolveLevel:function
    • Resolve log level to an array of effective log levels

      Parameters

      • level: string | number

        string or numeric log level: 'FATAL', 'ERROR', 'WARN', 'INFO', 'DEBUG', 'TRACE', 'ALL', 0, 1, 2, 3, 4

      Returns string[]

      array of effective log levels

  • resolvePayloadLevel:function
  • tail:function