Logger
API / publicodes / Logger
type Logger: object;
A logger object that can be passed to the engine to log messages.
Useful for debugging or customizing the engine’s output.
Type declaration
Name | Type | Defined in |
---|---|---|
error | void | packages/core/src/index.ts:73 |
log | void | packages/core/src/index.ts:71 |
warn | void | packages/core/src/index.ts:72 |
Example
const logger = {
log: () => {},
warn: () => {},
error: console.error,
}
const engine = new Engine(rules, { logger })