Frodo Library - v4.0.0-10
    Preparing search index...

    Type Alias Log

    type Log = {
        createLogApiKey(keyName: string): Promise<LogApiKey>;
        deleteLogApiKey(keyId: string): Promise<LogApiKey>;
        deleteLogApiKeys(): Promise<LogApiKey[]>;
        fetch(
            source: string,
            startTs: string,
            endTs: string,
            cookie: string,
            txid: string,
            filter: 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>>;
    }
    Index

    Methods

    • 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

    • Delete log api key

      Parameters

      • keyId: string

        key id

      Returns Promise<LogApiKey>

      a promise resolving to an object containing the log api key

    • Fetch logs

      Parameters

      • source: string

        log source(s) to tail

      • startTs: string

        start timestamp

      • endTs: string

        end timestamp

      • cookie: string

        paged results cookie

      • txid: string

        transaction id

      • filter: string

        query filter

      Returns Promise<PagedResult<LogEventSkeleton>>

      promise resolving to paged log event result

    • Get default noise filter

      Returns string[]

      array of default event types and loggers to be filtered out

    • Get available log sources

      Returns Promise<string[]>

      promise resolving to an array of available log sources

    • 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

    • 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