introduce consistent logging

This commit is contained in:
Andreas Brett
2021-11-11 12:31:28 +01:00
parent 5df34cd137
commit bdcdf47e52
15 changed files with 290 additions and 201 deletions

View File

@@ -1,7 +1,7 @@
const NotificationProvider = require("./notification-provider");
const axios = require("axios");
const Crypto = require("crypto");
const { debug } = require("../../src/util");
const { log } = require("../../src/util");
class Matrix extends NotificationProvider {
name = "matrix";
@@ -17,11 +17,11 @@ class Matrix extends NotificationProvider {
.slice(0, size)
);
debug("Random String: " + randomString);
log("notification", "Random String: " + randomString, "debug");
const roomId = encodeURIComponent(notification.internalRoomId);
debug("Matrix Room ID: " + roomId);
log("notification", "Matrix Room ID: " + roomId, "debug");
try {
let config = {