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).
This commit is contained in:
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
# @cordisjs/plugin-logger-console
|
||||
|
||||
Console exporter for the built-in Cordis logger service.
|
||||
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
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`.
|
||||
Reference in New Issue
Block a user