feat: Added version in logs

This commit is contained in:
Davidson Gomes 2023-08-07 19:46:34 -03:00
parent ad819bf3ba
commit da568e4ea5

View File

@ -1,6 +1,8 @@
import dayjs from 'dayjs';
import fs from 'fs';
import { configService, Log } from './env.config';
const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
const formatDateLog = (timestamp: number) =>
dayjs(timestamp)
@ -73,6 +75,7 @@ export class Logger {
console.log(
/*Command.UNDERSCORE +*/ Command.BRIGHT + Level[type],
'[Evolution API]',
`v${packageJson.version}`,
Command.BRIGHT + Color[type],
process.pid.toString(),
Command.RESET,