deepseek-harness/vendor/logger-console
2026-07-15 11:28:45 +08:00
..
src Use explicit ts specifiers for declarations 2026-06-22 06:11:00 +08:00
LICENSE Vendor Cordis framework packages as source 2026-06-11 10:53:32 +08:00
package.json pkg: update vendor dep 2026-07-15 11:28:45 +08:00
README.md Vendor Cordis framework packages as source 2026-06-11 10:53:32 +08:00
tsconfig.json refactor: rename build typings dir to types 2026-06-20 00:26:02 +08:00
tsdown.config.ts refactor: rename build typings dir to types 2026-06-20 00:26:02 +08:00

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