Skip to content

Commit a4373d1

Browse files
Merge pull request #139 from timvaillancourt/log_dir_fixv1
1.0.2: Log dir fixv1
2 parents 412aadd + fcc8bb7 commit a4373d1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mongodb_consistent_backup/Logger.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ def start(self):
3535
def start_file_logger(self):
3636
if self.do_file_log:
3737
try:
38+
if os.path.isdir(self.config.log_dir):
39+
os.mkdir(self.config.log_dir)
3840
self.current_log_file = os.path.join(self.config.log_dir, "backup.%s.log" % self.backup_name)
3941
self.backup_log_file = os.path.join(self.config.log_dir, "backup.%s.%s.log" % (self.backup_name, self.backup_time))
4042
self.file_log = logging.FileHandler(self.backup_log_file)

0 commit comments

Comments
 (0)