From fd6cc36dc3decf4d33b262055c63bb6f47faf633 Mon Sep 17 00:00:00 2001 From: Mike Degatano Date: Tue, 6 Apr 2021 23:56:31 -0400 Subject: [PATCH] Support all log levels --- loki/config.json | 2 +- loki/rootfs/etc/services.d/loki/run | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/loki/config.json b/loki/config.json index 3da7b0b..e9c40b9 100644 --- a/loki/config.json +++ b/loki/config.json @@ -26,6 +26,6 @@ "cafile": "str?", "days_to_keep": "int(2,)?", "config_path": "str?", - "log_level": "list(debug|info|warning|error)?" + "log_level": "list(trace|debug|info|notice|warning|error|fatal)?" } } diff --git a/loki/rootfs/etc/services.d/loki/run b/loki/rootfs/etc/services.d/loki/run index f1cb0a4..d1cda81 100755 --- a/loki/rootfs/etc/services.d/loki/run +++ b/loki/rootfs/etc/services.d/loki/run @@ -26,10 +26,13 @@ bashio::log.info "Retention period set to ${retention_period}" export "RETENTION_PERIOD=${retention_period}" case "$(bashio::config 'log_level')" in \ - error) log_level='error' ;; \ - warning) log_level='warn' ;; \ - debug) log_level='debug' ;; \ - *) log_level='info' ;; \ + trace) ;& \ + debug) log_level='debug' ;; \ + notice) ;& \ + warning) log_level='warn' ;; \ + error) ;& \ + fatal) log_level='error' ;; \ + *) log_level='info' ;; \ esac; bashio::log.info "Loki log level set to ${log_level}"