import { ILogger } from "../api/ILogger" ; import { ILogTarget } from "../api/ILogTarget" ; import { LogLevel } from "../api/LogLevel" ; private export class Logger implements ILogger { private _source : any ; private _target : ILogTarget ; param source param target constructor ( source , target ) { this . _source = source ; this . _target = target ; } inheritDoc public set source ( source ) { this . _source = source ; } inheritDoc public debug ( message , params ? ) { this . _target . log ( this . _source , LogLevel . DEBUG , this . getTimer ( ) , message , params ) ; } inheritDoc public info ( message , params ? ) { this . _target . log ( this . _source , LogLevel . INFO , this . getTimer ( ) , message , params ) ; } inheritDoc public warn ( message , params ? ) { this . _target . log ( this . _source , LogLevel . WARN , this . getTimer ( ) , message , params ) ; } inheritDoc public error ( message , params ? ) { this . _target . log ( this . _source , LogLevel . ERROR , this . getTimer ( ) , message , params ) ; } inheritDoc public fatal ( message , params ? ) { this . _target . log ( this . _source , LogLevel . FATAL , this . getTimer ( ) , message , params ) ; } private getTimer ( ) { return Date . now ( ) ; } }