mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Dependency Inversion for Logger (#1153)
* feat: interface "ILogger" created feat: interface "ILogger" used instead of pino logger feat: "PinoLoggerAdapter" created to implement "ILogger" interface * feat: PinoLoggerAdapter removed feat: ILogger mapping the features we're using from pino * fix: sort imports --------- Co-authored-by: Mateus Franchini de Freitas <contato.mateusfr@outlook.com> Co-authored-by: Mateus Franchini de Freitas <mfranchini@domtec.com.br> Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
This commit is contained in:
committed by
GitHub
parent
447e648958
commit
21f8431e61
@@ -866,7 +866,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
}
|
||||
|
||||
if(placeholderResendCache.get(messageKey?.id!)) {
|
||||
logger.debug('already requested resend', { messageKey })
|
||||
logger.debug({ messageKey }, 'already requested resend')
|
||||
return
|
||||
} else {
|
||||
placeholderResendCache.set(messageKey?.id!, true)
|
||||
@@ -875,7 +875,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
await delay(5000)
|
||||
|
||||
if(!placeholderResendCache.get(messageKey?.id!)) {
|
||||
logger.debug('message received while resend requested', { messageKey })
|
||||
logger.debug({ messageKey }, 'message received while resend requested')
|
||||
return 'RESOLVED'
|
||||
}
|
||||
|
||||
@@ -888,7 +888,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
|
||||
setTimeout(() => {
|
||||
if(placeholderResendCache.get(messageKey?.id!)) {
|
||||
logger.debug('PDO message without response after 15 seconds. Phone possibly offline', { messageKey })
|
||||
logger.debug({ messageKey }, 'PDO message without response after 15 seconds. Phone possibly offline')
|
||||
placeholderResendCache.del(messageKey?.id!)
|
||||
}
|
||||
}, 15_000)
|
||||
|
||||
Reference in New Issue
Block a user