mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
Honor user-set flag for LOG_TO_FILE (#10078)
This commit is contained in:
@@ -42,7 +42,11 @@ else:
|
||||
if DEBUG:
|
||||
LOG_LEVEL = 'DEBUG'
|
||||
|
||||
LOG_TO_FILE = os.getenv('LOG_TO_FILE', 'False').lower() in ['true', '1', 'yes']
|
||||
LOG_TO_FILE = os.getenv('LOG_TO_FILE', str(LOG_LEVEL == 'DEBUG')).lower() in [
|
||||
'true',
|
||||
'1',
|
||||
'yes',
|
||||
]
|
||||
DISABLE_COLOR_PRINTING = False
|
||||
|
||||
LOG_ALL_EVENTS = os.getenv('LOG_ALL_EVENTS', 'False').lower() in ['true', '1', 'yes']
|
||||
@@ -362,7 +366,6 @@ if DEBUG:
|
||||
openhands_logger.addFilter(StackInfoFilter())
|
||||
|
||||
if current_log_level == logging.DEBUG:
|
||||
LOG_TO_FILE = True
|
||||
openhands_logger.debug('DEBUG mode enabled.')
|
||||
|
||||
if LOG_JSON:
|
||||
|
||||
Reference in New Issue
Block a user