fix: retry messages

This commit is contained in:
Davidson Gomes
2024-04-17 18:10:43 -03:00
parent d190d8b1af
commit 5ae5d8546e
12 changed files with 71 additions and 33 deletions

View File

@@ -60,10 +60,16 @@ export class Logger {
private readonly configService = configService;
constructor(private context = 'Logger') {}
private instance = null;
public setContext(value: string) {
this.context = value;
}
public setInstance(value: string) {
this.instance = value;
}
private console(value: any, type: Type) {
const types: Type[] = [];
@@ -76,6 +82,8 @@ export class Logger {
/*Command.UNDERSCORE +*/ Command.BRIGHT + Level[type],
'[Evolution API]',
Command.BRIGHT + Color[type],
this.instance ? `[${this.instance}]` : '',
Command.BRIGHT + Color[type],
`v${packageJson.version}`,
Command.BRIGHT + Color[type],
process.pid.toString(),
@@ -99,6 +107,7 @@ export class Logger {
} else {
console.log(
'[Evolution API]',
this.instance ? `[${this.instance}]` : '',
process.pid.toString(),
'-',
`${formatDateLog(Date.now())} `,