tuil
ReferencePackages@mwillbanks/tuil-loggingAPI

LogRecord

interface exported by @mwillbanks/tuil-logging.

View rawEdit

interface

Public interface exported by @mwillbanks/tuil-logging.

export interface LogRecord {
  readonly timestamp?: bigint;
  readonly observedTimestamp?: bigint;
  readonly severityNumber?: number;
  readonly severityText?: string;
  readonly body: unknown;
  readonly attributes: Readonly<Record<string, unknown>>;
  readonly resource: Readonly<Record<string, unknown>>;
  readonly scope?: {
    readonly name?: string;
    readonly version?: string;
  };
  readonly traceId?: string;
  readonly spanId?: string;
  readonly flags?: number;
  readonly eventName?: string;
  readonly source: LogSource;
  readonly original: unknown;
  readonly diagnostics: readonly LogDiagnostic[];
  readonly duplicateCount?: number;
  readonly rateLimited?: boolean;
  readonly sampled?: boolean;
}

Members

MemberTypeRequiredDescriptionRelated types
timestampbigint | undefinedNoThe timestamp member uses the bigint | undefined contract.
observedTimestampbigint | undefinedNoThe observedTimestamp member uses the bigint | undefined contract.
severityNumbernumber | undefinedNoThe severityNumber member uses the number | undefined contract.
severityTextstring | undefinedNoThe severityText member uses the string | undefined contract.
bodyunknownYesThe body member uses the unknown contract.
attributesReadonly<Record<string, unknown>>YesThe attributes member uses the Readonly<Record<string, unknown>> contract.
resourceReadonly<Record<string, unknown>>YesThe resource member uses the Readonly<Record<string, unknown>> contract.
scope&#123; readonly name?: string; readonly version?: string; &#125; | undefinedNoThe scope member uses the &#123; readonly name?: string; readonly version?: string; &#125; | undefined contract.
traceIdstring | undefinedNoThe traceId member uses the string | undefined contract.
spanIdstring | undefinedNoThe spanId member uses the string | undefined contract.
flagsnumber | undefinedNoThe flags member uses the number | undefined contract.
eventNamestring | undefinedNoThe eventName member uses the string | undefined contract.
sourceLogSourceYesThe source member uses the LogSource contract.LogSource
originalunknownYesThe original member uses the unknown contract.
diagnosticsreadonly LogDiagnostic[]YesThe diagnostics member uses the readonly LogDiagnostic[] contract.LogDiagnostic
duplicateCountnumber | undefinedNoThe duplicateCount member uses the number | undefined contract.
rateLimitedboolean | undefinedNoThe rateLimited member uses the boolean | undefined contract.
sampledboolean | undefinedNoThe sampled member uses the boolean | undefined contract.

Parameters

This declaration has no public members.

Returns

This declaration does not return a value.

Throws

No thrown errors are documented for this declaration.

Source

View the secondary source reference

Package

@mwillbanks/tuil-logging

On this page