Revert "First pass at pulling the v1.5 CLI, TUI, and Launcher clients into v2."
This reverts commit 467b01edd6.
This commit is contained in:
parent
467b01edd6
commit
62d442b073
2 changed files with 203 additions and 24043 deletions
|
|
@ -1 +1 @@
|
|||
export { silentLogger, type InspectorLogger } from "./logger.js";
|
||||
export { silentLogger } from "./logger.js";
|
||||
|
|
|
|||
|
|
@ -1,39 +1,7 @@
|
|||
import type { Bindings, LevelWithSilentOrString, LogFn } from "pino";
|
||||
import pino from "pino";
|
||||
|
||||
/**
|
||||
* Logging surface InspectorClient uses. Real pino loggers satisfy this;
|
||||
* the default silent logger implements it without opening a stream.
|
||||
* Silent logger for use when no logger is injected. Satisfies pino.Logger,
|
||||
* does not output anything. InspectorClient uses this as the default.
|
||||
*/
|
||||
export interface InspectorLogger {
|
||||
level: LevelWithSilentOrString;
|
||||
fatal: LogFn;
|
||||
error: LogFn;
|
||||
warn: LogFn;
|
||||
info: LogFn;
|
||||
debug: LogFn;
|
||||
trace: LogFn;
|
||||
silent: LogFn;
|
||||
child(bindings?: Bindings): InspectorLogger;
|
||||
}
|
||||
|
||||
const noop: LogFn = () => {};
|
||||
|
||||
function createSilentLogger(): InspectorLogger {
|
||||
const logger: InspectorLogger = {
|
||||
level: "silent",
|
||||
fatal: noop,
|
||||
error: noop,
|
||||
warn: noop,
|
||||
info: noop,
|
||||
debug: noop,
|
||||
trace: noop,
|
||||
silent: noop,
|
||||
child: () => logger,
|
||||
};
|
||||
return logger;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default logger when none is injected. No-op at all levels; no SonicBoom stream.
|
||||
*/
|
||||
export const silentLogger: InspectorLogger = createSilentLogger();
|
||||
export const silentLogger = pino({ level: "silent" });
|
||||
|
|
|
|||
Loading…
Reference in a new issue