mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-07 08:14:25 +01:00
make the path reference in logger more robust
This commit is contained in:
@@ -24,7 +24,8 @@ For console handler: simulates typing
|
||||
class Logger(metaclass=Singleton):
|
||||
def __init__(self):
|
||||
# create log directory if it doesn't exist
|
||||
log_dir = os.path.join('..', 'logs')
|
||||
this_files_dir_path = os.path.dirname(__file__)
|
||||
log_dir = os.path.join(this_files_dir_path, '../logs')
|
||||
if not os.path.exists(log_dir):
|
||||
os.makedirs(log_dir)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user