diff --git a/src/main/resources/logback.groovy b/src/main/resources/logback.groovy index ab7757a..09988ac 100644 --- a/src/main/resources/logback.groovy +++ b/src/main/resources/logback.groovy @@ -32,11 +32,15 @@ appender("CONSOLE", ConsoleAppender) { target = defaultTarget } +def loggers = ["CONSOLE"] + if (logUrl != null) { - appender("DISCORD_ALL", DiscordLogAppender) { - level = INFO + appender("DISCORD_WEBHOOK", DiscordLogAppender) { + level = WARN url = System.getenv("DISCORD_LOGGER_URL") } + + loggers << "DISCORD_WEBHOOK" } -root(defaultLevel, ["CONSOLE"]) +root(defaultLevel, loggers)