summaryrefslogtreecommitdiffstats
path: root/wallace/module_gpgencrypt.py
diff options
context:
space:
mode:
Diffstat (limited to 'wallace/module_gpgencrypt.py')
-rw-r--r--wallace/module_gpgencrypt.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/wallace/module_gpgencrypt.py b/wallace/module_gpgencrypt.py
index 0337bf1..e623fe1 100644
--- a/wallace/module_gpgencrypt.py
+++ b/wallace/module_gpgencrypt.py
@@ -40,7 +40,9 @@ import pykolab
from pykolab.translate import _
-log = pykolab.getLogger('pykolab.wallace')
+log = pykolab.getLogger('pykolab.wallace/gpgencrypt')
+extra_log_params = {'qid': '-'}
+log = pykolab.logger.LoggerAdapter(log, extra_log_params)
conf = pykolab.getConf()
mybasepath = '/var/spool/pykolab/wallace/gpgencrypt/'
@@ -86,6 +88,13 @@ Content-Disposition: inline; filename=\"encrypted.asc\"\n\n"
return msg
def execute(*args, **kw):
+ 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)
@@ -93,9 +102,6 @@ def execute(*args, **kw):
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 kw.has_key('stage'):
log.debug(_("Issuing callback after processing to stage %s") % (kw['stage']), level=8)
log.debug(_("Testing cb_action_%s()") % (kw['stage']), level=8)