Files
Tianyi Cui 72688a3888 Vendor Cordis framework packages as source
cordis 4.0.0-rc.6, plugin-loader, -include, -group, -timer, -hmr,
-logger-console, cosmokit 1.8.1, schemastery 3.18.0 — copied from the
cordis-workspace checkout, flattened under vendor/, original npm names,
private: true. vendor/README.md is the manifest: upstream repos +
commit SHAs, local-modification log, sync procedure.

Local modification: hmr's locale YAML imports and .i18n() call removed
(avoids a runtime YAML import hook we don't vendor).
2026-06-11 10:53:32 +08:00

877 B

@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.