summaryrefslogtreecommitdiffstats
path: root/gallery_dl/output.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/output.py')
-rw-r--r--gallery_dl/output.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gallery_dl/output.py b/gallery_dl/output.py
index 9508ff3..c0971f0 100644
--- a/gallery_dl/output.py
+++ b/gallery_dl/output.py
@@ -210,7 +210,7 @@ def configure_logging(loglevel):
root.setLevel(minlevel)
-def setup_logging_handler(key, fmt=LOG_FORMAT, lvl=LOG_LEVEL):
+def setup_logging_handler(key, fmt=LOG_FORMAT, lvl=LOG_LEVEL, mode="w"):
"""Setup a new logging handler"""
opts = config.interpolate(("output",), key)
if not opts:
@@ -219,7 +219,7 @@ def setup_logging_handler(key, fmt=LOG_FORMAT, lvl=LOG_LEVEL):
opts = {"path": opts}
path = opts.get("path")
- mode = opts.get("mode", "w")
+ mode = opts.get("mode", mode)
encoding = opts.get("encoding", "utf-8")
try:
path = util.expand_path(path)