28 lines
584 B
TypeScript
28 lines
584 B
TypeScript
var logConfig = require("../../conf/json/log4.json")
|
|
import log from "../../game/log/log"
|
|
|
|
export default class SKLogger{
|
|
static log:any = null
|
|
static isDebug:boolean=true;
|
|
static initLog(gametype:string) {
|
|
this.log = new log(gametype)
|
|
}
|
|
|
|
static warn(msg:any) {
|
|
console.warn(msg);
|
|
this.log.warn(msg)
|
|
}
|
|
|
|
static info(msg:any){
|
|
console.info(msg);
|
|
this.log.info(msg)
|
|
}
|
|
|
|
static debug(msg:any){
|
|
if(!this.isDebug){
|
|
return;
|
|
}
|
|
console.debug(msg);
|
|
this.log.err(msg)
|
|
}
|
|
} |