GConsole.ts 382 Bytes
Newer Older
wildfirecode's avatar
1  
wildfirecode committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
export class GConsole {
    private static switch: boolean = window['debug'] || true;
    /**
     * 日志打印
     * @param args 
     */
    public static log(...args): void {
        if (!this.switch) {
            return;
        }
        let i = 0;
        const len: number = args.length;
        for (i; i < len; i++) {
            console.log(args[i]);
        }
    }
}