import { ConsoleLogger } from "./console" ; export enum LogLevel { ALL = 0 , TRACE = 0 , DEBUG = 1 , INFO = 2 , WARN = 3 , ERROR = 4 , FATAL = 5 , OFF = 6 } export namespace LogLevel { let _level = LogLevel . INFO ; export function bellow ( level ) { return _level > level ; } export function set ( level ) { if ( level == null || level === undefined ) _level = LogLevel . OFF ; else _level = level ; } } export interface Logger { todo ( message , ... args ) : void ; fatal ( message , ... args ) : any ; error ( message , ... args ) : any ; info ( message , ... args ) : void ; warn ( message , ... args ) : void ; debug ( message , ... args ) : void ; trace ( message , ... args ) : void ; time ( ) : [ number , number ] ; timeEnd ( start , message , ... args ) : void ; } export namespace Logger { export const sys = new ConsoleLogger ( "tyx" , "log" ) ; export function get ( logName , emitter ? ) { return new ConsoleLogger ( logName , emitter ) ; } }