-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce "/etc/rsyslog.d/ros2-logging.conf". (#10)
Signed-off-by: Tomoya Fujita <[email protected]>
- Loading branch information
1 parent
0fc7e06
commit 2d1d4b9
Showing
2 changed files
with
35 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |