From db2d30caaff3864b20f497c7bc72823ba962b6da Mon Sep 17 00:00:00 2001 From: Guldoman Date: Tue, 31 May 2022 02:26:42 +0200 Subject: [PATCH] Add `warn` log level --- data/core/init.lua | 3 +++ data/core/style.lua | 1 + 2 files changed, 4 insertions(+) diff --git a/data/core/init.lua b/data/core/init.lua index 884c77bf..332ac915 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -1089,6 +1089,9 @@ function core.log_quiet(...) return log("INFO", false, false, ...) end +function core.warn(...) + return log("WARN", true, true, ...) +end function core.error(...) return log("ERROR", true, true, ...) diff --git a/data/core/style.lua b/data/core/style.lua index 70ad502c..7258eb16 100644 --- a/data/core/style.lua +++ b/data/core/style.lua @@ -76,6 +76,7 @@ style.syntax_fonts = {} style.log = { INFO = { icon = "i", color = style.text }, + WARN = { icon = "!", color = style.warn }, ERROR = { icon = "!", color = style.error } }