JavaScriptAPI reference
Logs
Logs in the JavaScript SDK.
// access
nexus.logs| Symbol | Kind | Summary |
|---|---|---|
LogLevel | type | |
LogOptions | interface | |
NexusLogs | class | Structured logging — buffered, batched, session-correlated. |
LogLevel
typeexport type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error';LogOptions
interfacesource
propertysource?: stringcontext
propertycontext?: Record<string, unknown>NexusLogs
classStructured logging — buffered, batched, session-correlated.
NexusLogs
constructornew NexusLogs(http: NexusHttp, id: NexusIdentity, cfg: ResolvedConfig)Parameters
Prop
Type
Returns NexusLogs
trace()
methodtrace(message: string, options?: LogOptions): voidParameters
Prop
Type
debug()
methoddebug(message: string, options?: LogOptions): voidParameters
Prop
Type
info()
methodinfo(message: string, options?: LogOptions): voidParameters
Prop
Type
warn()
methodwarn(message: string, options?: LogOptions): voidParameters
Prop
Type
error()
methoderror(message: string, options?: LogOptions): voidParameters
Prop
Type
log()
methodlog(level: LogLevel, message: string, options?: LogOptions): voidParameters
Prop
Type
flush()
methodflush(): Promise<void>dispose()
methoddispose(): void