aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-12-19 22:32:04 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-12-19 22:41:49 +0800
commit85be2fbf19ef937709f747b0c9169a2cf3e6697e (patch)
treed30f38a72403cb9736fbe9218ef1725f0e80b538 /packages/utils/src
parent69de1d05efcadc1a6e70e98a0e77f32e8976560e (diff)
downloaddexon-sol-tools-85be2fbf19ef937709f747b0c9169a2cf3e6697e.tar
dexon-sol-tools-85be2fbf19ef937709f747b0c9169a2cf3e6697e.tar.gz
dexon-sol-tools-85be2fbf19ef937709f747b0c9169a2cf3e6697e.tar.bz2
dexon-sol-tools-85be2fbf19ef937709f747b0c9169a2cf3e6697e.tar.lz
dexon-sol-tools-85be2fbf19ef937709f747b0c9169a2cf3e6697e.tar.xz
dexon-sol-tools-85be2fbf19ef937709f747b0c9169a2cf3e6697e.tar.zst
dexon-sol-tools-85be2fbf19ef937709f747b0c9169a2cf3e6697e.zip
Move logWithTime to logUtils
Diffstat (limited to 'packages/utils/src')
-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}`);
+ },
};