Browse Source

Do not log decoding of articles by default to reduce logging density

The Debug logs were getting way too confusing with all the "Decoding X" in there, when 99% of the time it is of no importance.
pull/1061/head
Safihre 8 years ago
parent
commit
01603b24f5
  1. 1
      sabnzbd/cfg.py
  2. 6
      sabnzbd/decoder.py
  3. 2
      sabnzbd/interface.py

1
sabnzbd/cfg.py

@ -261,6 +261,7 @@ fixed_ports = OptionBool('misc', 'fixed_ports', False)
api_warnings = OptionBool('misc', 'api_warnings', True, protect=True)
disable_key = OptionBool('misc', 'disable_api_key', False, protect=True)
no_penalties = OptionBool('misc', 'no_penalties', False)
debug_log_decoding = OptionBool('misc', 'debug_log_decoding', False)
# Text values
rss_odd_titles = OptionList('misc', 'rss_odd_titles', ['nzbindex.nl/', 'nzbindex.com/', 'nzbclub.com/'])

6
sabnzbd/decoder.py

@ -31,6 +31,7 @@ from sabnzbd.constants import Status, MAX_DECODE_QUEUE, LIMIT_DECODE_QUEUE, SABY
import sabnzbd.articlecache
import sabnzbd.downloader
import sabnzbd.nzbqueue
import sabnzbd.cfg as cfg
from sabnzbd.encoding import yenc_name_fixer
from sabnzbd.misc import match_str
@ -79,6 +80,7 @@ class Decoder(Thread):
self.queue = queue
self.servers = servers
self.__log_decoding = cfg.debug_log_decoding()
def stop(self):
# Put multiple to stop all decoders
@ -115,7 +117,9 @@ class Decoder(Thread):
if nzo.precheck:
raise BadYenc
register = True
logging.debug("Decoding %s", art_id)
if self.__log_decoding:
logging.debug("Decoding %s", art_id)
data = self.decode(article, lines, raw_data)
nzf.article_count += 1

2
sabnzbd/interface.py

@ -1373,7 +1373,7 @@ class ConfigSwitches(object):
SPECIAL_BOOL_LIST = \
('start_paused', 'no_penalties', 'ignore_wrong_unrar', 'overwrite_files', 'enable_par_cleanup',
'queue_complete_pers', 'api_warnings', 'ampm', 'enable_unrar', 'enable_unzip', 'enable_7zip',
'enable_filejoin', 'enable_tsjoin', 'ignore_unrar_dates',
'enable_filejoin', 'enable_tsjoin', 'ignore_unrar_dates', 'debug_log_decoding',
'multipar', 'osx_menu', 'osx_speed', 'win_menu', 'use_pickle', 'allow_incomplete_nzb',
'rss_filenames', 'ipv6_hosting', 'keep_awake', 'empty_postproc', 'html_login', 'wait_for_dfolder',
'max_art_opt', 'warn_empty_nzb', 'enable_bonjour', 'reject_duplicate_files', 'warn_dupl_jobs',

Loading…
Cancel
Save