mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-17 23:05:11 -05:00
Logging for tornado.access is now sent to NullHandler so it doesnt complain that it has no handler, still disables logging for tornado.access
This commit is contained in:
parent
53e7c53b8a
commit
38edbc8b8b
@ -71,14 +71,12 @@ class SBRotatingLogHandler(object):
|
|||||||
sb_logger = logging.getLogger('sickbeard')
|
sb_logger = logging.getLogger('sickbeard')
|
||||||
sub_logger = logging.getLogger('subliminal')
|
sub_logger = logging.getLogger('subliminal')
|
||||||
imdb_logger = logging.getLogger('imdbpy')
|
imdb_logger = logging.getLogger('imdbpy')
|
||||||
tornado_general_logger = logging.getLogger('tornado.general')
|
tornado_logger = logging.getLogger('tornado')
|
||||||
tornado_application_logger = logging.getLogger('tornado.application')
|
|
||||||
|
|
||||||
sb_logger.removeHandler(handler)
|
sb_logger.removeHandler(handler)
|
||||||
sub_logger.removeHandler(handler)
|
sub_logger.removeHandler(handler)
|
||||||
imdb_logger.removeHandler(handler)
|
imdb_logger.removeHandler(handler)
|
||||||
tornado_general_logger.removeHandler(handler)
|
tornado_logger.removeHandler(handler)
|
||||||
tornado_application_logger.removeHandler(handler)
|
|
||||||
|
|
||||||
handler.flush()
|
handler.flush()
|
||||||
handler.close()
|
handler.close()
|
||||||
@ -145,6 +143,9 @@ class SBRotatingLogHandler(object):
|
|||||||
logging.getLogger('subliminal').setLevel(log_level)
|
logging.getLogger('subliminal').setLevel(log_level)
|
||||||
logging.getLogger('imdbpy').setLevel(log_level)
|
logging.getLogger('imdbpy').setLevel(log_level)
|
||||||
|
|
||||||
|
# send logging to null
|
||||||
|
logging.getLogger('tornado.access').addHandler(logging.NullHandler())
|
||||||
|
|
||||||
# already logging in new log folder, close the old handler
|
# already logging in new log folder, close the old handler
|
||||||
if old_handler:
|
if old_handler:
|
||||||
self.close_log(old_handler)
|
self.close_log(old_handler)
|
||||||
@ -203,8 +204,7 @@ class SBRotatingLogHandler(object):
|
|||||||
sb_logger = logging.getLogger('sickbeard')
|
sb_logger = logging.getLogger('sickbeard')
|
||||||
sub_logger = logging.getLogger('subliminal')
|
sub_logger = logging.getLogger('subliminal')
|
||||||
imdb_logger = logging.getLogger('imdbpy')
|
imdb_logger = logging.getLogger('imdbpy')
|
||||||
tornado_general_logger = logging.getLogger('tornado.general')
|
tornado_logger = logging.getLogger('tornado')
|
||||||
tornado_application_logger = logging.getLogger('tornado.application')
|
|
||||||
|
|
||||||
# delete the old handler
|
# delete the old handler
|
||||||
if self.cur_handler:
|
if self.cur_handler:
|
||||||
@ -229,8 +229,7 @@ class SBRotatingLogHandler(object):
|
|||||||
sb_logger.addHandler(new_file_handler)
|
sb_logger.addHandler(new_file_handler)
|
||||||
sub_logger.addHandler(new_file_handler)
|
sub_logger.addHandler(new_file_handler)
|
||||||
imdb_logger.addHandler(new_file_handler)
|
imdb_logger.addHandler(new_file_handler)
|
||||||
tornado_general_logger.addHandler(new_file_handler)
|
tornado_logger.addHandler(new_file_handler)
|
||||||
tornado_application_logger.addHandler(new_file_handler)
|
|
||||||
|
|
||||||
def log(self, toLog, logLevel=MESSAGE):
|
def log(self, toLog, logLevel=MESSAGE):
|
||||||
|
|
||||||
@ -254,8 +253,7 @@ class SBRotatingLogHandler(object):
|
|||||||
|
|
||||||
sub_logger = logging.getLogger('subliminal')
|
sub_logger = logging.getLogger('subliminal')
|
||||||
imdb_logger = logging.getLogger('imdbpy')
|
imdb_logger = logging.getLogger('imdbpy')
|
||||||
tornado_general_logger = logging.getLogger('tornado.general')
|
tornado_logger = logging.getLogger('tornado')
|
||||||
tornado_application_logger = logging.getLogger('tornado.application')
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if logLevel == DEBUG:
|
if logLevel == DEBUG:
|
||||||
|
Loading…
Reference in New Issue
Block a user