InvergeDocs
JavaScriptAPI reference

Logs

Logs in the JavaScript SDK.

// access
nexus.logs
SymbolKindSummary
LogLeveltype
LogOptionsinterface
NexusLogsclassStructured logging — buffered, batched, session-correlated.

LogLevel

type
export type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error';

LogOptions

interface

source

property
source?: string

context

property
context?: Record<string, unknown>

NexusLogs

class

Structured logging — buffered, batched, session-correlated.

NexusLogs

constructor
new NexusLogs(http: NexusHttp, id: NexusIdentity, cfg: ResolvedConfig)

Parameters

Prop

Type

Returns NexusLogs

View source

trace()

method
trace(message: string, options?: LogOptions): void

Parameters

Prop

Type

View source

debug()

method
debug(message: string, options?: LogOptions): void

Parameters

Prop

Type

View source

info()

method
info(message: string, options?: LogOptions): void

Parameters

Prop

Type

View source

warn()

method
warn(message: string, options?: LogOptions): void

Parameters

Prop

Type

View source

error()

method
error(message: string, options?: LogOptions): void

Parameters

Prop

Type

View source

log()

method
log(level: LogLevel, message: string, options?: LogOptions): void

Parameters

Prop

Type

View source

flush()

method
flush(): Promise<void>
View source

dispose()

method
dispose(): void
View source

On this page