export type LogLevel = "debug" | "info" | "warn" | "error"; export type Logger = { debug: (message: string) => void; info: (message: string) => void; warn: (message: string) => void; error: (message: string) => void; }; /** Where a log line goes when no run is current: the console, by level. * `console.error` and `console.warn` write to standard error, the other * two to standard output, as they always have. */ export declare function consoleLogSink(level: LogLevel, text: string): void; /** Where a logger writes: the `settings` part of a host. */ export type LogSink = { log(level: LogLevel, text: string): void; }; /** * A logger whose lines go to `sink`, the settings part of the run's host, * so an app that embeds the runtime sees the runtime's warnings. A caller * that has the run passes `run.ctx.host.settings`. Without a sink, each * line goes to the host of the current run when there is one, and to the * console otherwise, which is also where the logger stands after a * helper's first `await`; nodeHost sends lines to the console too, so * on Node the two are the same. */ export declare function createLogger(level?: LogLevel, sink?: LogSink): Logger;