Skip to content

Commit

Permalink
log all scriptworker events in verify_chain_of_trust
Browse files Browse the repository at this point in the history
We were logging `verify_chain_of_trust` with
`scriptworker.cot.verify.log`, which is set to
`logging.getLogger(__name__)`. This meant that any scriptworker
functions outside of the scriptworker.cot.verify namespace weren't being
logged.

Now we're logging `verify_chain_of_trust` with a `scriptworker`
namespace.

Fixes mozilla-releng#175.
  • Loading branch information
escapewindow committed Apr 17, 2018
1 parent cd9dc85 commit c9b5a53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scriptworker/cot/verify.py
Expand Up @@ -1816,8 +1816,9 @@ async def verify_chain_of_trust(chain):
"""
log_path = os.path.join(chain.context.config["task_log_dir"], "chain_of_trust.log")
scriptworker_log = logging.getLogger('scriptworker')
with contextual_log_handler(
chain.context, path=log_path, log_obj=log,
chain.context, path=log_path, log_obj=scriptworker_log,
formatter=AuditLogFormatter(
fmt=chain.context.config['log_fmt'],
datefmt=chain.context.config['log_datefmt'],
Expand Down

0 comments on commit c9b5a53

Please sign in to comment.