Adding log information to events

This commit is contained in:
2015-01-18 17:19:39 -06:00
parent bd1b0b5e32
commit fd70bedc05
28 changed files with 204 additions and 41 deletions

View File

@@ -2,6 +2,7 @@
import platform
import os
import sys
import logging
from platform_utils import paths as paths_
from functools import wraps
@@ -9,6 +10,8 @@ from functools import wraps
mode = None
directory = None
log = logging.getLogger("paths")
def merge_paths(func):
@wraps(func)
def merge_paths_wrapper(*a):
@@ -28,6 +31,7 @@ def config_path():
elif mode == "installed":
path = data_path("config")
if not os.path.exists(path):
log.debug("%s path does not exist, creating..." % (path,))
os.mkdir(path)
return path
@@ -40,6 +44,7 @@ def logs_path():
elif mode == "installed":
path = data_path("logs")
if not os.path.exists(path):
log.debug("%s path does not exist, creating..." % (path,))
os.mkdir(path)
return path