imccyu 7bedce822f release(vendor): cordis 4.0.1, cosmokit 1.8.2, group 1.0.1, hmr 1.0.16, include 1.0.6, loader 1.0.2, logger-console 1.0.1, schemastery 3.18.1, timer 1.1.3 4 недель назад
..
src ec601ca13d build(vendor): rescope the vendored Cordis packages into @deepseek-ai 1 месяц назад
LICENSE 72688a3888 Vendor Cordis framework packages as source 3 месяцев назад
README.md 72688a3888 Vendor Cordis framework packages as source 3 месяцев назад
package.json 7bedce822f release(vendor): cordis 4.0.1, cosmokit 1.8.2, group 1.0.1, hmr 1.0.16, include 1.0.6, loader 1.0.2, logger-console 1.0.1, schemastery 3.18.1, timer 1.1.3 4 недель назад
tsconfig.json 7f131dd4d8 refactor: rename build typings dir to types 2 месяцев назад
tsdown.config.ts 7f131dd4d8 refactor: rename build typings dir to types 2 месяцев назад

README.md

@cordisjs/plugin-logger-console

Console exporter for the built-in Cordis logger service.

Usage

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')

Config

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.