diff --git a/roles/jellyfin/tasks/main.yml b/roles/jellyfin/tasks/main.yml index bf96fee..8411f09 100644 --- a/roles/jellyfin/tasks/main.yml +++ b/roles/jellyfin/tasks/main.yml @@ -6,6 +6,12 @@ loop: - jellyfin-cache - jellyfin-config +- name: Copy logging config + become: true + ansible.builtin.template: + src: logging.json.j2 + dest: /var/lib/docker/volumes/jellyfin-config/_data/config/logging.json + mode: "0644" - name: Run jellyfin become: true community.docker.docker_container: diff --git a/roles/jellyfin/templates/logging.json.j2 b/roles/jellyfin/templates/logging.json.j2 new file mode 100644 index 0000000..7d04a55 --- /dev/null +++ b/roles/jellyfin/templates/logging.json.j2 @@ -0,0 +1,21 @@ +{ + "Serilog": { + "MinimumLevel": { + "Default": "Information", + "Override": { + "Microsoft": "Warning", + "System": "Warning", + "Jellyfin.Api.Controllers.UniversalAudioController": "Warning" + } + }, + "WriteTo": [ + { + "Name": "Console", + "Args": { + "outputTemplate": "[{Timestamp:HH:mm:ss}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message:lj}{NewLine}{Exception}" + } + } + ], + "Enrich": [ "FromLogContext", "WithThreadId" ] + } +}