import registerDebug from "debug" ; import { ILogger } from "@fluidframework/server-services-core" ; /**
 * Implementation of debug logger
 */ export class DebugLogger implements ILogger { param namespace public static create ( namespace ) { const debugInfo = registerDebug ( namespace ) ; const debugWarn = registerDebug ( namespace ) ; debugWarn . log = console . warn . bind ( console ) ; debugWarn . enabled = true ; const debugErr = registerDebug ( namespace ) ; debugErr . log = console . error . bind ( console ) ; debugErr . enabled = true ; return new DebugLogger ( debugInfo , debugErr , debugWarn ) ; } constructor ( private readonly debugInfo , private readonly debugErr , private readonly debugWarn ) { } public info ( message ) { this . debugInfo ( message ) ; } public warn ( message ) { this . debugWarn ( message ) ; } public error ( message ) { this . debugErr ( message ) ; } }