mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Honor user-set flag for LOG_TO_FILE (#10078)
This commit is contained in:
parent
a36d1673fa
commit
d30f77c60a
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user