Add `warn` log level

This commit is contained in:
Guldoman 2022-05-31 02:26:42 +02:00
parent c92f6a7b7f
commit db2d30caaf
No known key found for this signature in database
GPG Key ID: EA928C8BDA1A8825
2 changed files with 4 additions and 0 deletions

View File

@ -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, ...)

View File

@ -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 }
}