docs/ts/runtime/log.mdx
Debug: number
Error: number
Info: number
Trace: number
Warn: number
debug(msg, fields?): void
Debug logs a message at the debug level.
string
any
void
error(err, fields?): void
unknown
any
void
error(
err,
msg,
fields?): void;
unknown
string
any
void
error(msg, fields?): void
string
any
void
info(msg, fields?): void
Info logs a message at the info level.
string
any
void
trace(msg, fields?): void
Trace logs a message at the trace level.
string
any
void
warn(err, fields?): void
Warn logs a message at the warn level.
unknown
any
void
warn(
err,
msg,
fields?): void;
Warn logs a message at the warn level.
unknown
string
any
void
warn(msg, fields?): void
Warn logs a message at the warn level.
string
any
void
with(fields): Logger
Returns a new logger with the given fields added to the context.
any
withLevel(level): Logger
Returns a new logger with the specified level.
type FieldsObject = Record<string, FieldValue>
A map of fields that can be logged
type FieldValue =
| string
| number
| boolean
| null
| undefined
| FieldsObject
| FieldValue[];
A field value we support logging
<!-- symbol-end -->const default: Logger
function debug(msg, fields?): void
Debug logs a message at the debug level
string
any
void
function error(err, fields?): void
Error logs a message at the error level
unknown
any
void
function error(
err,
msg,
fields?): void;
Error logs a message at the error level
unknown
string
any
void
function error(msg, fields?): void
Error logs a message at the error level
string
any
void
function info(msg, fields?): void
Info logs a message at the info level
string
any
void
function trace(msg, fields?): void
Trace logs a message at the trace level
string
any
void
function warn(err, fields?): void
Warn logs a message at the warn level
unknown
any
void
function warn(
err,
msg,
fields?): void;
Warn logs a message at the warn level
unknown
string
any
void
function warn(msg, fields?): void
Warn logs a message at the warn level
string
any
void