From c9b5a53ffebe8d050250ce81f36f2267c04f43c1 Mon Sep 17 00:00:00 2001 From: Aki Sasaki Date: Tue, 17 Apr 2018 12:50:12 -0700 Subject: [PATCH] log all scriptworker events in `verify_chain_of_trust` 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 #175. --- scriptworker/cot/verify.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scriptworker/cot/verify.py b/scriptworker/cot/verify.py index a8476294..5d525dd3 100644 --- a/scriptworker/cot/verify.py +++ b/scriptworker/cot/verify.py @@ -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'],