Skip to content

Commit d2a724e

Browse files
if file name not provided in function, use user provided name
1 parent 63868eb commit d2a724e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

launch/launch/logging/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def get_log_file_path(self, file_name='launch.log'):
322322
file_name = self.file_name
323323
return os.path.join(self.log_dir, file_name)
324324

325-
def get_log_file_handler(self, file_name='launch.log'):
325+
def get_log_file_handler(self, file_name=None):
326326
"""
327327
Get the logging handler to a log file.
328328
@@ -333,6 +333,8 @@ def get_log_file_handler(self, file_name='launch.log'):
333333
:return: the logging handler associated to the file (always the same
334334
once constructed).
335335
"""
336+
if file_name is None:
337+
file_name = self.file_name
336338
if file_name not in self.file_handlers:
337339
file_path = self.get_log_file_path(file_name)
338340
factory = self.log_handler_factory

0 commit comments

Comments
 (0)