Changed logger to WatchFileHandler to automatically create  if something happens to it. Enables continuous logging. Closes
import logging
+import logging.handlers
import os
from vent.helpers.paths import PathDirs
@@ -10,11 +11,14 @@ def Logger(name, **kargs):
logging.captureWarnings(True)
logger = logging.getLogger(name)
logger.setLevel(logging.INFO)
- handler = logging.FileHandler(os.path.join(path_dirs.meta_dir, "vent.log"))
+ handler = logging.handlers.WatchedFileHandler(os.path.join(
+ path_dirs.meta_dir, "vent.log"))
handler.setLevel(logging.INFO)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - '
'%(message)s')
handler.setFormatter(formatter)
if not len(logger.handlers):
logger.addHandler(handler)
+
return logger
+
