Skip to content

Commit

Permalink
Now creating log folder if doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
nrchandan committed Feb 18, 2014
1 parent 95c3608 commit a2a86f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Logging.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import logging
from logging.handlers import TimedRotatingFileHandler

Expand All @@ -15,7 +16,8 @@ def setup_logging():
myhandler.setFormatter(formatter)
LOGGER.addHandler(myhandler)


if not os.path.isdir("log"):
os.path.mkdir("log")
LOGGER = logging.getLogger('ovpl')
setup_logging()
LOG_FD = open(LOG_FILENAME, 'a')

0 comments on commit a2a86f1

Please sign in to comment.