(opts?: LoggerBuilderOptions): LoggerBuilderResultGenerate loggers corresponding to the specified options
| Name | Type | Default |
|---|---|---|
| opts | LoggerBuilderOptions | {} |
Logger builder options | ||
LoggerBuilderResultLogger generation results
Logger builder options
Logger generation results
(name?: string) => LoggerRetrieve loggers with specified name
default logger name default will be set(name: string) => NormalizedLoggerOptionsRetrieves logger options corresponding to the specified logger name
typeof LoggerConstructor of the generated logger class
Logger
(name: string, opts: NormalizedLoggerOptions): Logger| Name | Type | Default |
|---|---|---|
| name* | string | |
| opts* | NormalizedLoggerOptions |
LoggerstringLogger Name
Transformer[]List of log transform functions
Transport[]List of Log transporter
"silent" | "error" | "warn" | "info" | "trace" | "debug"Log level thresholds that determine log output
(level: LogLevel, ...args: any[]): Promise<any[]>Output logs at a specified log level
| Name | Type | Default |
|---|---|---|
| level* | "error" | "warn" | "info" | "trace" | "debug" | |
Log level | ||
| args | any[] | |
List of log arguments | ||
Promise<any[]>Promise instance of log output result
(...args: any[]): Promise<any[]>Output logs at the trace level
| Name | Type | Default |
|---|---|---|
| args | any[] | |
List of log arguments | ||
Promise<any[]>Promise instance of log output result
(...args: any[]): Promise<any[]>Output logs at the debug level
| Name | Type | Default |
|---|---|---|
| args | any[] | |
List of log arguments | ||
Promise<any[]>Promise instance of log output result
(...args: any[]): Promise<any[]>Output logs at the info level
| Name | Type | Default |
|---|---|---|
| args | any[] | |
List of log arguments | ||
Promise<any[]>Promise instance of log output result
(...args: any[]): Promise<any[]>Output logs at the warn level
| Name | Type | Default |
|---|---|---|
| args | any[] | |
List of log arguments | ||
Promise<any[]>Promise instance of log output result
(...args: any[]): Promise<any[]>Output logs at the error level
| Name | Type | Default |
|---|---|---|
| args | any[] | |
List of log arguments | ||
Promise<any[]>Promise instance of log output result
"error" | "warn" | "info" | "trace" | "debug"Available log level
"silent" | "error" | "warn" | "info" | "trace" | "debug"Log level thresholds that determine log output
silent is specified, no log is outputLogger Options
Logger payload
This payload is passed on to the transformer or transport method in turn
"error" | "warn" | "info" | "trace" | "debug"Log level
{ name: string; }Logger Information
stringMessage
any[]List of arguments passed to the logger
MLogger Meta Information
undefined | { index: number; instance: Error; }The first error detected from the arguments.
(payload: LoggerPayload): LoggerPayload| Name | Type | Default |
|---|---|---|
| payload* | LoggerPayload<Meta> |
LoggerPayload<Meta>Log transform function
Function to convert the passed payload.
(payload: LoggerPayload): any | Promise<any>| Name | Type | Default |
|---|---|---|
| payload* | LoggerPayload<Meta> |
anyLog output function
Function to output and send the passed payload to standard output, external logging services, etc.
Log transporter
undefined | "silent" | "error" | "warn" | "info" | "trace" | "debug"Log level thresholds that determine log output
undefined | Transformer[]List of transform functions
TransportFuncLog output function