logs in right dir when P2S invoked from other dir
This commit is contained in:
parent
709379c7d0
commit
23c559f59f
@ -42,11 +42,6 @@ import os
|
||||
import time
|
||||
import logging, logging.handlers
|
||||
|
||||
if not os.path.exists('User'): os.mkdir('User')
|
||||
with open(os.path.join('User', 'logs.txt'), 'a+') as log_f: pass
|
||||
logging.basicConfig(format='%(message)s', level=logging.INFO,
|
||||
handlers = [logging.handlers.TimedRotatingFileHandler(os.path.join('User', 'logs.txt'), when='D', interval=7), logging.StreamHandler()])
|
||||
|
||||
|
||||
## AUTHORSHIP INFORMATION
|
||||
__author__ = "David Pagnon"
|
||||
@ -80,6 +75,10 @@ def base_params(config_dict):
|
||||
seq_name = os.path.basename(project_dir)
|
||||
frames = ["all frames" if frame_range == [] else f"frames {frame_range[0]} to {frame_range[1]}"][0]
|
||||
|
||||
with open(os.path.join(project_dir, 'User', 'logs.txt'), 'a+') as log_f: pass
|
||||
logging.basicConfig(format='%(message)s', level=logging.INFO,
|
||||
handlers = [logging.handlers.TimedRotatingFileHandler(os.path.join(project_dir, 'User', 'logs.txt'), when='D', interval=7), logging.StreamHandler()])
|
||||
|
||||
return project_dir, seq_name, frames
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user