aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src/log_utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/utils/src/log_utils.ts')
-rw-r--r--packages/utils/src/log_utils.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/utils/src/log_utils.ts b/packages/utils/src/log_utils.ts
index 87f8479b5..6d9996c67 100644
--- a/packages/utils/src/log_utils.ts
+++ b/packages/utils/src/log_utils.ts
@@ -1,3 +1,5 @@
+import chalk from 'chalk';
+
export const logUtils = {
log(...args: any[]): void {
console.log(...args); // tslint:disable-line:no-console
@@ -5,4 +7,7 @@ export const logUtils = {
warn(...args: any[]): void {
console.warn(...args); // tslint:disable-line:no-console
},
+ logWithTime(arg: string): void {
+ logUtils.log(`[${chalk.gray(new Date().toLocaleTimeString())}] ${arg}`);
+ },
};