From 3352844024b867b98850f9d26886c782d8ca3ce1 Mon Sep 17 00:00:00 2001 From: AliasAlreadyTaken Date: Sat, 26 Feb 2022 03:14:32 +0100 Subject: [PATCH] Logging --- init.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 3b0c809..59e7f2f 100644 --- a/init.lua +++ b/init.lua @@ -32,7 +32,7 @@ local token = core.settings:get("yl_matterbridge.token") or "" local http = core.request_http_api() -assert(http, "Please add yl_matterbridge to secure.http_mods") +assert(http, "[MOD] yl_matterbridge: Please add yl_matterbridge to secure.http_mods") function send(user_name, message_text) local url = "http://" .. address .. ":" .. port .. "/api/message" @@ -54,9 +54,8 @@ function send(user_name, message_text) function(result) if result.succeeded then local data = core.parse_json(result.data) - core.log("action", "[MOD] yl_matterbridge : Posted " .. dump(data)) else - core.log("error", "[yl_matterbridge] " .. dump(result)) + core.log("error", "[MOD] yl_matterbridge: send/http.fetch failed. Result = " .. dump(result)) return false end end @@ -82,7 +81,7 @@ local function receive() end end else - core.log("error", "[yl_matterbridge] " .. dump(result)) + core.log("error", "[MOD] yl_matterbridge: receive/http.fetch failed. Result = " .. dump(result)) return false end end