summaryrefslogtreecommitdiff
path: root/src/logging.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/logging.py')
-rw-r--r--src/logging.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/logging.py b/src/logging.py
index f94ac466..c7414b17 100644
--- a/src/logging.py
+++ b/src/logging.py
@@ -18,13 +18,11 @@
import sys
from os import environ, makedirs
+import os
from datetime import datetime
from config import config
-DATA_HOME = config.get('log_dir', environ.get("XDG_DATA_HOME"))
-if not DATA_HOME:
- DATA_HOME = environ.get('HOME')+'/.local/share'
-DATA_PATH = DATA_HOME + '/poezio/'
+DATA_HOME = config.get('log_dir', os.path.join(environ.get('XDG_DATA_HOME') or os.path.join(environ.get('HOME'), '.local', 'share'), 'poezio'))
class Logger(object):
"""