summaryrefslogtreecommitdiffstats
path: root/wallace/module_signature.py
diff options
context:
space:
mode:
Diffstat (limited to 'wallace/module_signature.py')
-rw-r--r--wallace/module_signature.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/wallace/module_signature.py b/wallace/module_signature.py
index 5098120..97766c7 100644
--- a/wallace/module_signature.py
+++ b/wallace/module_signature.py
@@ -33,7 +33,9 @@ from pykolab.auth import Auth
from pykolab.translate import _
# pylint: disable=invalid-name
-log = pykolab.getLogger('pykolab.wallace')
+log = pykolab.getLogger('pykolab.wallace/signature')
+extra_log_params = {'qid': '-'}
+log = pykolab.logger.LoggerAdapter(log, extra_log_params)
conf = pykolab.getConf()
mybasepath = '/var/spool/pykolab/wallace/signature/'
@@ -78,6 +80,13 @@ def attr_resolve(sender_info, attr):
# pylint: disable=too-many-branches,too-many-locals,too-many-statements
def execute(*args, **kw): # noqa: C901
+ global extra_log_params
+
+ # TODO: Test for correct call.
+ filepath = args[0]
+
+ extra_log_params['qid'] = os.path.basename(filepath)
+
if not os.path.isdir(mybasepath):
os.makedirs(mybasepath)
@@ -85,9 +94,6 @@ def execute(*args, **kw): # noqa: C901
if not os.path.isdir(os.path.join(mybasepath, stage)):
os.makedirs(os.path.join(mybasepath, stage))
- # TODO: Test for correct call.
- filepath = args[0]
-
if 'stage' in kw:
log.debug(_("Issuing callback after processing to stage %s") % (kw['stage']), level=8)
log.debug(_("Testing cb_action_%s()") % (kw['stage']), level=8)