From 9aeab2111499cfb13befefa9f0d3778879fc935c Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 2 Feb 2019 03:27:11 +0100 Subject: [PATCH] add options to adjust log verbosity --- defaults/main.yml | 5 +++++ templates/opt/jellyfin/config/logging.json.j2 | 9 ++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index aa9d526..2a37c1d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -40,6 +40,11 @@ jellyfin_logrotate_config: - compress - shred +# Possible: Verbose | Debug | Information | Warning | Error | Fatal +# Beware that the values are case sensitive! +jellyfin_log_level_console: Fatal +jellyfin_log_level_file: Information + jellyfin_base_url: https://mystream.example.com # DONT CHANGE IT! # Changing the bind ports is currently not supported diff --git a/templates/opt/jellyfin/config/logging.json.j2 b/templates/opt/jellyfin/config/logging.json.j2 index 20bdb1a..0f49d59 100644 --- a/templates/opt/jellyfin/config/logging.json.j2 +++ b/templates/opt/jellyfin/config/logging.json.j2 @@ -5,7 +5,8 @@ { "Name": "Console", "Args": { - "outputTemplate": "[{Timestamp:HH:mm:ss}] [{Level:u5}] {Message:lj}{NewLine}{Exception}" + "outputTemplate": "[{Timestamp:HH:mm:ss}] [{Level:u5}] {Message:lj}{NewLine}{Exception}", + "restrictedToMinimumLevel": "{{ jellyfin_log_level_console }}" } }, { @@ -16,10 +17,8 @@ "Name": "File", "Args": { "path": "{{ jellyfin_log_dir }}/jellyfin.log", - "fileSizeLimitBytes": 10485700, - "rollOnFileSizeLimit": true, - "retainedFileCountLimit": 10, - "outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u4}] {Message}{NewLine}{Exception}" + "outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u4}] {Message}{NewLine}{Exception}", + "restrictedToMinimumLevel": "{{ jellyfin_log_level_file }}" } } ]