God these logs are gonna be the END OF ME
This commit is contained in:
parent
0e64a9f0c8
commit
0752221b85
3
index.js
3
index.js
|
|
@ -457,7 +457,7 @@ xmpp.on("stanza", (stanza) => {
|
|||
const bodyData = getFirstURL(body);
|
||||
// get product id from "x" tag
|
||||
var evt = events[product_id.pil.substring(0, 3)];
|
||||
|
||||
if (process.env.LOG_EVENTS === "true") {
|
||||
// Log the full event object to a file named "productid-timestamp-channelname.json"
|
||||
const nowDate = new Date();
|
||||
const year = nowDate.getFullYear();
|
||||
|
|
@ -481,6 +481,7 @@ xmpp.on("stanza", (stanza) => {
|
|||
return value;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
if (!evt) {
|
||||
evt = { name: "Unknown", priority: 3 }
|
||||
|
|
|
|||
Loading…
Reference in a new issue