mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: log timestamps in ISO format
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import P from 'pino'
|
||||
import type { CommonSocketConfig, LegacySocketConfig, MediaType, SocketConfig } from '../Types'
|
||||
import { Browsers } from '../Utils'
|
||||
import logger from '../Utils/logger'
|
||||
import { version } from './baileys-version.json'
|
||||
|
||||
export const UNAUTHORIZED_CODES = [401, 403, 419]
|
||||
@@ -25,7 +25,7 @@ const BASE_CONNECTION_CONFIG: CommonSocketConfig<any> = {
|
||||
waWebSocketUrl: 'wss://web.whatsapp.com/ws/chat',
|
||||
connectTimeoutMs: 20_000,
|
||||
keepAliveIntervalMs: 25_000,
|
||||
logger: P().child({ class: 'baileys' }),
|
||||
logger: logger.child({ class: 'baileys' }),
|
||||
printQRInTerminal: false,
|
||||
emitOwnEvents: true,
|
||||
defaultQueryTimeoutMs: 60_000,
|
||||
|
||||
3
src/Utils/logger.ts
Normal file
3
src/Utils/logger.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import P from 'pino'
|
||||
|
||||
export default P({ timestamp: () => `,"time":"${new Date().toJSON()}"` })
|
||||
Reference in New Issue
Block a user