aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src/log_utils.ts
blob: 6d9996c67973e35deb2b586122289f768cf9d0f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import chalk from 'chalk';

export const logUtils = {
    log(...args: any[]): void {
        console.log(...args); // tslint:disable-line:no-console
    },
    warn(...args: any[]): void {
        console.warn(...args); // tslint:disable-line:no-console
    },
    logWithTime(arg: string): void {
        logUtils.log(`[${chalk.gray(new Date().toLocaleTimeString())}] ${arg}`);
    },
};