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
@@ -1,5 +1,4 @@
|
||||
import { AxiosRequestConfig } from 'axios'
|
||||
import type { Logger } from 'pino'
|
||||
import { proto } from '../../WAProto'
|
||||
import { AuthenticationCreds, BaileysEventEmitter, CacheStore, Chat, GroupMetadata, ParticipantAction, RequestJoinAction, RequestJoinMethod, SignalKeyStoreWithTransaction, SocketConfig, WAMessageStubType } from '../Types'
|
||||
import { getContentType, normalizeMessageContent } from '../Utils/messages'
|
||||
@@ -7,6 +6,7 @@ import { areJidsSameUser, isJidBroadcast, isJidStatusBroadcast, jidNormalizedUse
|
||||
import { aesDecryptGCM, hmacSign } from './crypto'
|
||||
import { getKeyAuthor, toNumber } from './generics'
|
||||
import { downloadAndProcessHistorySyncNotification } from './history'
|
||||
import { ILogger } from './logger'
|
||||
|
||||
type ProcessMessageContext = {
|
||||
shouldProcessHistoryMsg: boolean
|
||||
@@ -15,7 +15,7 @@ type ProcessMessageContext = {
|
||||
keyStore: SignalKeyStoreWithTransaction
|
||||
ev: BaileysEventEmitter
|
||||
getMessage: SocketConfig['getMessage']
|
||||
logger?: Logger
|
||||
logger?: ILogger
|
||||
options: AxiosRequestConfig<{}>
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user