summaryrefslogtreecommitdiffstats
path: root/custodia/log.py
diff options
context:
space:
mode:
Diffstat (limited to 'custodia/log.py')
-rw-r--r--custodia/log.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/custodia/log.py b/custodia/log.py
index 313a7fc..e175cdb 100644
--- a/custodia/log.py
+++ b/custodia/log.py
@@ -45,7 +45,7 @@ def setup_logging(debug=False, auditfile='custodia.audit.log'):
custodia_logger.setLevel(logging.INFO)
audit_logger = logging.getLogger('custodia.audit')
- if len(audit_logger.handlers) == 0:
+ if auditfile is not None and len(audit_logger.handlers) == 0:
audit_fmt = logging.Formatter(LOGGING_FORMAT, LOGGING_DATEFORMAT)
audit_hdrl = logging.FileHandler(auditfile)
audit_hdrl.setFormatter(audit_fmt)