import { PACKAGE_ID } from "./helpers" ; export const color = { blue : 34 , magenta : 35 , cyan : 36 , gray : 90 } ; export enum LogLevel { Trace = "TRA" , Info = "INF" , Warning = "WRN" , Error = "ERR" } class Logger { log ( level , color , ... args ) { console . log . apply ( undefined , [ `\x1b[${ color }m[${ level }] ${ PACKAGE_ID }` , ... args , "\x1b[0m" ] ) ; } param args info ( ... args ) { console . log . apply ( undefined , [ "[INF] " + PACKAGE_ID , ... args ] ) ; } param args trace ( ... args ) { this . log ( LogLevel . Trace , color . gray , ... args ) ; } param args warn ( ... args ) { console . warn . apply ( undefined , [ "[WRN] " + PACKAGE_ID , ... args ] ) ; } } export const log = new Logger ( ) ;