You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I would like to write all log messages which are written to launch.log per default additionally to the system log (and later on to a remote logging server).
What I tried so far is to add a SysLogHandler in my launch.py file to every registered logger:
import launch.logging
import logging.handlers
import logging
def generate_launch_description():
for logger in launch.logging.LaunchLogger.all_loggers:
handler = logging.handlers.SysLogHandler(address = '/dev/log')
logger.addHandler(handler)
logger.critical("test")
The "test" message is logged correctly but the actual output of all other loggers is not shown in the syslog. I guess the reason for this that the loggers are created when the LaunchDescription is executed.
So my question is: How can a add an additional handler to every logger created by ros2 launch in order to write all log messages which are written to launch.log also to the syslog.
The text was updated successfully, but these errors were encountered:
Hi,
I would like to write all log messages which are written to
launch.log
per default additionally to the system log (and later on to a remote logging server).What I tried so far is to add a SysLogHandler in my launch.py file to every registered logger:
The "test" message is logged correctly but the actual output of all other loggers is not shown in the syslog. I guess the reason for this that the loggers are created when the LaunchDescription is executed.
So my question is: How can a add an additional handler to every logger created by ros2 launch in order to write all log messages which are written to
launch.log
also to the syslog.The text was updated successfully, but these errors were encountered: