diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator index 683612d5..4d66c392 100755 --- a/src/sbin/livemedia-creator +++ b/src/sbin/livemedia-creator @@ -1093,6 +1093,9 @@ def setup_logging(opts): :param opts: options passed to livemedia-creator :type opts: argparse options """ + if not os.path.isdir(os.path.abspath(os.path.dirname(opts.logfile))): + os.makedirs(os.path.abspath(os.path.dirname(opts.logfile))) + # Setup logging to console and to logfile log.setLevel(logging.DEBUG) pylorax_log.setLevel(logging.DEBUG)