import { LogLevel } from "logger/Logger" ; import { LogEvent , Sink } from "logger/Sink" ; /**
 * Sink that logs directly to the console.
 */ export class ConsoleSink implements Sink { public emit ( logEvent ) { let log ; switch ( logEvent . level ) { case LogLevel . DEBUG : case LogLevel . INFO : log = console . info ; break ; case LogLevel . WARN : log = console . warn ; break ; case LogLevel . ERROR : log = console . error ; break ; default : log = ( ) => { } ; } log ( logEvent . message ) ; } public dispose ( ) { } }