From fae9af96bf1cd039acb89d8c28a2cecaa8aa20f7 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Tue, 31 May 2022 02:35:56 +0200 Subject: [PATCH] Expose function to create custom log entries --- data/core/init.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/data/core/init.lua b/data/core/init.lua index 332ac915..c0e2d477 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -1056,7 +1056,7 @@ function core.get_views_referencing_doc(doc) end -function log(level, show, backtrace, fmt, ...) +function core.custom_log(level, show, backtrace, fmt, ...) local text = string.format(fmt, ...) if show then local s = style.log[level] @@ -1081,20 +1081,20 @@ end function core.log(...) - return log("INFO", true, false, ...) + return core.custom_log("INFO", true, false, ...) end function core.log_quiet(...) - return log("INFO", false, false, ...) + return core.custom_log("INFO", false, false, ...) end function core.warn(...) - return log("WARN", true, true, ...) + return core.custom_log("WARN", true, true, ...) end function core.error(...) - return log("ERROR", true, true, ...) + return core.custom_log("ERROR", true, true, ...) end