Private GIT

Skip to content
Snippets Groups Projects
Commit 27931760 authored by miigotu's avatar miigotu
Browse files

Only show commit hash for ERROR log lines

parent 4b514916
No related branches found
No related tags found
No related merge requests found
......@@ -196,9 +196,12 @@ class Logger(object): # pylint: disable=too-many-instance-attributes
:param kwargs: to pass to logger
"""
cur_thread = threading.currentThread().getName()
cur_hash = ''
if level == 'ERROR' and sickbeard.CUR_COMMIT_HASH and len(sickbeard.CUR_COMMIT_HASH) > 6:
cur_hash = '[{0}] '.format(
sickbeard.CUR_COMMIT_HASH[:7]
) if sickbeard.CUR_COMMIT_HASH and len(sickbeard.CUR_COMMIT_HASH) > 6 else ''
)
message = '{thread} :: {hash}{message}'.format(
thread=cur_thread, hash=cur_hash, message=msg)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment