3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-23 19:19:31 +01:00

log: remove references to script directory

This is wrong when log.py is present in ~/.local/lib/... or /usr/lib/...
This commit is contained in:
James Lu 2016-06-20 18:23:05 -07:00
parent c6968fa2b8
commit 04de033454

5
log.py
View File

@ -15,10 +15,7 @@ from .conf import conf, confname
stdout_level = conf['logging'].get('stdout') or 'INFO' stdout_level = conf['logging'].get('stdout') or 'INFO'
# Set the logging directory to $CURDIR/log, creating it if it doesn't logdir = os.path.join(os.getcwd(), 'log')
# already exist
curdir = os.path.dirname(os.path.realpath(__file__))
logdir = os.path.join(curdir, 'log')
os.makedirs(logdir, exist_ok=True) os.makedirs(logdir, exist_ok=True)
_format = '%(asctime)s [%(levelname)s] %(message)s' _format = '%(asctime)s [%(levelname)s] %(message)s'