mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Fix logging of send/recv xml nodes with pino (#653)
This commit is contained in:
@@ -129,7 +129,7 @@ export const makeSocket = (config: SocketConfig) => {
|
||||
/** send a binary node */
|
||||
const sendNode = (frame: BinaryNode) => {
|
||||
if(logger.level === 'trace') {
|
||||
logger.trace(binaryNodeToString(frame), 'xml send')
|
||||
logger.trace({ xml: binaryNodeToString(frame), msg: 'xml send' })
|
||||
}
|
||||
|
||||
const buff = encodeBinaryNode(frame)
|
||||
@@ -319,7 +319,7 @@ export const makeSocket = (config: SocketConfig) => {
|
||||
const msgId = frame.attrs.id
|
||||
|
||||
if(logger.level === 'trace') {
|
||||
logger.trace(binaryNodeToString(frame), 'recv xml')
|
||||
logger.trace({ xml: binaryNodeToString(frame), msg: 'recv xml' })
|
||||
}
|
||||
|
||||
/* Check if this is a response to a message we sent */
|
||||
|
||||
Reference in New Issue
Block a user