-
Notifications
You must be signed in to change notification settings - Fork 1
/
ros2-logging.conf
32 lines (28 loc) · 1.44 KB
/
ros2-logging.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#
# ROS Setting
#
# This is an example rsyslog configuration for rcl_logging_syslog.
# User needs to update and modify based on the required configuration.
#
# For more information install rsyslog-doc and see
# /usr/share/doc/rsyslog-doc/html/configuration/index.html
#
# Message Format Template
# See more details for https://www.rsyslog.com/doc/configuration/properties.html
$template TemplateName1,"%timereported% %hostname% %syslogfacility-text%.%syslogseverity-text%: %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"
# Directory and File Name Template
# See more details for https://www.rsyslog.com/doc/configuration/properties.html
### e.g) /var/log/ros/tomoyafujita/talker_428132_2024-09-04.log
$template TemplateName2,"/var/log/ros/%hostname%/%programname%_%procid%_%$now%.log"
### e.g) /var/log/ros/2024/09/04/tomoyafujita/talker_428151.log
$template TemplateName3,"/var/log/ros/%$year%/%$month%/%$day%/%hostname%/%programname%_%procid%.log"
### e.g) /var/log/ros/2024-09-04/tomoyafujita/info/talker-428214.log
$template TemplateName4,"/var/log/ros/%$now%/%hostname%/%syslogseverity-text%/%programname%-%procid%.log"
# Log locally with specified templated file name.
local1.* ?TemplateName2;TemplateName1
local2.* ?TemplateName3;TemplateName1
local3.* ?TemplateName4;TemplateName1
# For remote server, it also needs to set those templates
local1.* @@<FluentBit IP Address>:5140
local2.* @@<FluentBit IP Address>:5140
local3.* @@<FluentBit IP Address>:5140