export interface Logger { info(message: string): void; warn(message: string): void; error(message: string): void; debug(message: string): void; } export function createLogger(verbose: boolean): Logger { return { info(message: string) { console.log(`[ghostoff] ${message}`); }, warn(message: string) { console.warn(`[ghostoff] WARN ${message}`); }, error(message: string) { console.error(`[ghostoff] ERROR ${message}`); }, debug(message: string) { if (verbose) console.log(`[ghostoff] DEBUG ${message}`); }, }; }