Skip to content

Commit 4d5a354

Browse files
reset log file name after we change source
Signed-off-by: Tanishq Chaudhary <[email protected]>
1 parent 84549c7 commit 4d5a354

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

launch/launch/logging/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,6 @@ def get_output_loggers(process_name, output_config):
490490
# If a 'log' output is configured for this source or for
491491
# 'both' sources, this logger should output to launch main log file.
492492
if 'log' in (output_config['both'] | output_config[source]):
493-
launch_config.log_file_name = 'launch.log'
494493
launch_log_file_handler = launch_config.get_log_file_handler()
495494
# Add launch main log file handler if necessary.
496495
if launch_log_file_handler not in logger.handlers:
@@ -517,6 +516,9 @@ def get_output_loggers(process_name, output_config):
517516
# Add combined log file handler if necessary.
518517
if combined_log_file_handler not in logger.handlers:
519518
logger.addHandler(combined_log_file_handler)
519+
520+
# Reset log file name since we will iterate over the sources
521+
launch_config._log_file_name = None
520522
# Retrieve both loggers.
521523
return (
522524
logging.getLogger(process_name + '-stdout'),

0 commit comments

Comments
 (0)