From df9e7f284c95c151a006eedf6be2ead49987e778 Mon Sep 17 00:00:00 2001 From: saltycrys <73420320+saltycrys@users.noreply.github.com> Date: Mon, 4 Jan 2021 17:05:45 +0100 Subject: [PATCH] Adjust log verbosity The default log level has been changed from `debug` to `info`. The `debug` log level is now more verbose. `debug` now gives a general overview of what is happening (where implemented) while `trace` gives all available details. --- src/invidious/channels.cr | 1 + src/invidious/helpers/helpers.cr | 2 +- src/invidious/jobs/refresh_channels_job.cr | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/invidious/channels.cr b/src/invidious/channels.cr index 274e86f9..9986fe1b 100644 --- a/src/invidious/channels.cr +++ b/src/invidious/channels.cr @@ -203,6 +203,7 @@ def get_channel(id, db, refresh = true, pull_all_videos = true) end def fetch_channel(ucid, db, pull_all_videos = true, locale = nil) + LOGGER.debug("fetch_channel: #{ucid}") LOGGER.trace("fetch_channel: #{ucid} : pull_all_videos = #{pull_all_videos}, locale = #{locale}") LOGGER.trace("fetch_channel: #{ucid} : Downloading RSS feed") diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr index cf965dad..e41f8317 100644 --- a/src/invidious/helpers/helpers.cr +++ b/src/invidious/helpers/helpers.cr @@ -67,7 +67,7 @@ class Config property channel_threads : Int32 = 1 # Number of threads to use for crawling videos from channels (for updating subscriptions) property feed_threads : Int32 = 1 # Number of threads to use for updating feeds property output : String = "STDOUT" # Log file path or STDOUT - property log_level : LogLevel = LogLevel::Debug # Default log level, valid YAML values are ints and strings, see src/invidious/helpers/logger.cr + property log_level : LogLevel = LogLevel::Info # Default log level, valid YAML values are ints and strings, see src/invidious/helpers/logger.cr property db : DBConfig # Database configuration property decrypt_polling : Bool = true # Use polling to keep decryption function up to date property full_refresh : Bool = false # Used for crawling channels: threads should check all videos uploaded by a channel diff --git a/src/invidious/jobs/refresh_channels_job.cr b/src/invidious/jobs/refresh_channels_job.cr index 0c6ef79e..3e94a56e 100644 --- a/src/invidious/jobs/refresh_channels_job.cr +++ b/src/invidious/jobs/refresh_channels_job.cr @@ -26,7 +26,7 @@ class Invidious::Jobs::RefreshChannelsJob < Invidious::Jobs::BaseJob end end - LOGGER.trace("RefreshChannelsJob: #{id} : Spawning fiber") + LOGGER.debug("RefreshChannelsJob: #{id} : Spawning fiber") active_fibers += 1 spawn do begin @@ -52,7 +52,7 @@ class Invidious::Jobs::RefreshChannelsJob < Invidious::Jobs::BaseJob end end ensure - LOGGER.trace("RefreshChannelsJob: #{id} fiber : Done") + LOGGER.debug("RefreshChannelsJob: #{id} fiber : Done") active_channel.send(true) end end