/**
 * Simple logger that just writes to the console.
 */ import { ILogger } from 'polar-shared/src/logger/ILogger' ; /**
 * Annotates log calls with the level.  Helpful when the target is the
 * console logger.
 */ export class LevelAnnotatingLogger implements ILogger { public readonly name : string ; private readonly delegate : ILogger ; constructor ( delegate ) { this . delegate = delegate ; this . name = `level-annotating-logger -> ${ delegate . name }` ; } public notice ( msg , ... args ) { this . delegate . info ( `[notice] ${ msg }` , ... args ) ; } public info ( msg , ... args ) { this . delegate . info ( `[info] ${ msg }` , ... args ) ; } public warn ( msg , ... args ) { this . delegate . warn ( `[warn] ${ msg }` , ... args ) ; } public error ( msg , ... args ) { this . delegate . error ( `[error] ${ msg }` , ... args ) ; } public verbose ( msg , ... args ) { this . delegate . verbose ( `[verbose] ${ msg }` , ... args ) ; } public debug ( msg , ... args ) { this . delegate . debug ( `[debug] ${ msg }` , ... args ) ; } public async sync ( ) { await this . delegate . sync ( ) ; } }