import { ILogger } from "../api/ILogger" ; import { ILogTarget } from "../api/ILogTarget" ; import { LogLevel } from "../api/LogLevel" ; import { Logger } from "../impl/Logger" ; private export class LogManager implements ILogTarget { private _logLevel : number = LogLevel . INFO ; /**
     * The current log level
     */ public get logLevel ( ) : number { return this . _logLevel ; } /**
     * Sets the current log level
     */ public set logLevel ( value ) { this . _logLevel = value ; } private _targets : ILogTarget [ ] = [ ] ; param source return public getLogger ( source ) { return new Logger ( source , this ) ; } param target return public addLogTarget ( target ) { this . _targets . push ( target ) ; } inheritDoc public log ( source , level , timestamp , message , params ? ) { if ( level > this . _logLevel ) { return ; } this . _targets . forEach ( ( target ) => { target . log ( source , level , timestamp , message , params ) ; } ) ; } public removeAllTargets ( ) { this . _targets = [ ] ; } }