Create the config directory if it doesn't exist yet, in order to save the log file.

bzr-revno: 722
This commit is contained in:
Raoul Snyman 2010-03-04 21:47:17 +02:00
commit 977e896a21
2 changed files with 5 additions and 2 deletions

View File

@ -159,7 +159,10 @@ def main():
parser.add_option("-s", "--style", dest="style",
help="Set the Qt4 style (passed directly to Qt4).")
# Set up logging
filename = os.path.join(get_config_directory(), u'openlp.log')
log_path = get_config_directory()
if not os.path.exists(log_path):
os.makedirs(log_path)
filename = os.path.join(log_path, u'openlp.log')
logfile = FileHandler(filename, u'w')
logfile.setFormatter(logging.Formatter(
u'%(asctime)s %(name)-15s %(levelname)-8s %(message)s'))

View File

@ -1 +1 @@
1.9.0-bzr721
1.9.0-bzr722