mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
utils: use reggol for logging
This commit is contained in:
1 parent
5b7067d77d
commit
ab933bc9d5
7 files changed
+12
-97
No files matched your search
@@ -7,6 +7,11 @@ import fs from 'fs-extra';
|
||||
import type { Moment } from 'moment-timezone';
|
||||
import { isMoment } from 'moment-timezone';
|
||||
import { ObjectID } from 'mongodb';
|
||||
import Logger from 'reggol';
|
||||
|
||||
Logger.levels.base = process.env.DEV ? 3 : 2;
|
||||
|
||||
export { Logger };
|
||||
|
||||
const encrypt = (algorithm, content) => crypto.createHash(algorithm).update(content).digest('hex');
|
||||
export const sha1 = (content: string) => encrypt('sha1', content);
|
||||
|
||||
Reference in new issue
Block a user