|
|
hai 1 semana | |
|---|---|---|
| .. | ||
| src | hai 1 mes | |
| LICENSE | hai 3 meses | |
| README.md | hai 3 meses | |
| package.json | hai 1 semana | |
| tsconfig.json | hai 2 meses | |
| tsdown.config.ts | hai 2 meses | |
Console exporter for the built-in Cordis logger service.
import { Context } from 'cordis'
import ConsoleLogger from '@cordisjs/plugin-logger-console'
const root = new Context()
await root.plugin(ConsoleLogger, {
showDiff: true,
levels: {
default: 2,
hmr: 3,
},
})
root.logger('app').info('started')
| Field | Description |
|---|---|
colors |
Color support level, or false to disable colors. |
maxLength |
Maximum rendered line length before truncation. |
levels |
Per-logger minimum level map. |
showDiff |
Show elapsed time since the previous message. |
showTime |
Timestamp template. |
label |
Label width, margin, and alignment options. |
The Node entry uses node:util.inspect for %o and %O; the browser entry
passes log arguments through to console.