UNPKG
@renvyteam/baileys
Version:
latest (1.0.4)
1.0.4
WhatsApp API For Interact In WhatsApp
exonity.tech
@renvyteam/baileys
/
lib
/
Socket
/
Tools
/
debugger.js
8 lines
(7 loc)
•
276 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
function
logEvent
(
config, eventType, data = {}
) {
if
(!config?.
debug
)
return
;
const
timestamp =
new
Date
().
toISOString
()
const
line =
`[
${timestamp}
] [
${eventType.toUpperCase()}
]
${
JSON
.stringify(data,
null
,
2
)}
`
console
.
log
(line) }
module
.
exports
= logEvent;