aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src/utils
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-12-19 21:32:59 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-12-19 22:41:49 +0800
commit87d157b805465d76a8eb25cda84fb91dc064faec (patch)
tree445f4d4e0f4cf087c40025d7a2f3075a57f36f89 /packages/sol-compiler/src/utils
parent56d48758d308f9450aaac2e986dd09efd8d479c0 (diff)
downloaddexon-sol-tools-87d157b805465d76a8eb25cda84fb91dc064faec.tar
dexon-sol-tools-87d157b805465d76a8eb25cda84fb91dc064faec.tar.gz
dexon-sol-tools-87d157b805465d76a8eb25cda84fb91dc064faec.tar.bz2
dexon-sol-tools-87d157b805465d76a8eb25cda84fb91dc064faec.tar.lz
dexon-sol-tools-87d157b805465d76a8eb25cda84fb91dc064faec.tar.xz
dexon-sol-tools-87d157b805465d76a8eb25cda84fb91dc064faec.tar.zst
dexon-sol-tools-87d157b805465d76a8eb25cda84fb91dc064faec.zip
Move logWithTime function to utils
Diffstat (limited to 'packages/sol-compiler/src/utils')
-rw-r--r--packages/sol-compiler/src/utils/utils.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/sol-compiler/src/utils/utils.ts b/packages/sol-compiler/src/utils/utils.ts
index 4f2de2caa..538efc61a 100644
--- a/packages/sol-compiler/src/utils/utils.ts
+++ b/packages/sol-compiler/src/utils/utils.ts
@@ -1,6 +1,12 @@
+import { logUtils } from '@0x/utils';
+import chalk from 'chalk';
+
export const utils = {
stringifyWithFormatting(obj: any): string {
const stringifiedObj = JSON.stringify(obj, null, '\t');
return stringifiedObj;
},
+ logWithTime(arg: string): void {
+ logUtils.log(`[${chalk.gray(new Date().toLocaleTimeString())}] ${arg}`);
+ },
};