-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup : checking rcl_logging_syslog log setup and capture #14
Comments
@david-vexev thanks for creating issue, and trying this out with humble.
depends on application and requirement. if you want the logging directory to be pointed to under home directory, that you can configure. those templates are just examples. i expect that once rsyslog receives the log data, that should be managed under rsyslog access permission, so i would not store the logging data under some user's home folder.
that means you are still using default logging backend which is a couple of questions,
cd <your workspace>/src
git clone https://github.com/fujitatomoya/rcl_logging_syslog.git
git clone -b humble [email protected]:ros2/rcl.git
cd <your workspace>/
export RCL_LOGGING_IMPLEMENTATION=rcl_logging_syslog
colcon build --symlink-install --cmake-clean-cache --packages-select rcl_logging_syslog rcl
source install/setup.bash the procedure and configuration files look just fine for me. |
@david-vexev friendly ping. |
Thank you for your patient and thorough reply! You are right - I used the humble-desktop Ubuntu deb package for my workspace and did not clone in |
@david-vexev thanks, the reason i did not realize this situation is that i always work on the mainline and build the source code. but as you reported here, that is not the situation for application perspective. if you share the result that would be really appreciated. |
I downloaded and installed ros2 humble from source following these instructions. I then made an empty workspace called
I also tried to un-source my local ros2 humble and rerun the colcon build in a new terminal. I suspect I'm not doing something right with the ros2 sourcing as it's warning about an underlay override in my local build. This Happy to help out with more testing - sorry if these logs are not quite pointing in the right direction. |
So with tomoyafujita@~/DVT >docker run -it --rm ros:rolling
root@cbb36102a87b:/# apt update && apt upgrade -y
root@5fbbf9b8346c:~# apt install ros-rolling-ros-base
root@5fbbf9b8346c:~# apt install -y ros-dev-tools
root@5fbbf9b8346c:~# cd && mkdir -p workspace/src/ && cd workspace/src/
root@5fbbf9b8346c:~/workspace/src# git clone https://github.com/fujitatomoya/rcl_logging_syslog.git
root@5fbbf9b8346c:~/workspace/src# git clone -b rolling https://github.com/ros2/rcl.git
root@5fbbf9b8346c:~/workspace/src# git clone -b rolling https://github.com/ros2/rcl_logging.git
root@353e28a50105:~/workspace/src# cd ../
root@353e28a50105:~/workspace/src# apt install -y ros-rolling-mimick-vendor ros-rolling-test-msgs ros-rolling-demo-nodes-cpp ros-rolling-demo-nodes-py ros-rolling-osrf-testing-tools-cpp ros-rolling-performance-test-fixture
root@353e28a50105:~/workspace/src# source /opt/ros/rolling/setup.bash
root@353e28a50105:~/workspace/src# export RCL_LOGGING_IMPLEMENTATION=rcl_logging_syslog
root@353e28a50105:~/workspace/src# colcon build --symlink-install --cmake-clean-cache log messages in the file system via rsyslog, root@1ebd9147068c:/var/log# find ros/
ros/
ros/1ebd9147068c
ros/1ebd9147068c/talker_8759_2024-09-24.log
root@1ebd9147068c:/var/log# cat ros/1ebd9147068c/talker_8759_2024-09-24.log
Sep 24 23:10:20 1ebd9147068c local1.info: talker[8759]: [INFO] [1727219420.266692525] [talker]: Publishing: 'Hello World: 1'
Sep 24 23:10:21 1ebd9147068c local1.info: talker[8759]: [INFO] [1727219421.266661300] [talker]: Publishing: 'Hello World: 2'
Sep 24 23:10:22 1ebd9147068c local1.info: talker[8759]: [INFO] [1727219422.266745949] [talker]: Publishing: 'Hello World: 3'
Sep 24 23:10:23 1ebd9147068c local1.info: talker[8759]: [INFO] [1727219423.266779083] [talker]: Publishing: 'Hello World: 4'
Sep 24 23:10:24 1ebd9147068c local1.info: talker[8759]: [INFO] [1727219424.266700325] [talker]: Publishing: 'Hello World: 5'
Sep 24 23:10:25 1ebd9147068c local1.info: talker[8759]: [INFO] [1727219425.266680812] [talker]: Publishing: 'Hello World: 6'
Sep 24 23:10:26 1ebd9147068c local1.info: talker[8759]: [INFO] [1727219426.266697324] [talker]: Publishing: 'Hello World: 7'
Sep 24 23:10:27 1ebd9147068c local1.info: talker[8759]: [INFO] [1727219427.266764715] [talker]: Publishing: 'Hello World: 8'
Sep 24 23:10:28 1ebd9147068c local1.info: talker[8759]: [INFO] [1727219428.266691083] [talker]: Publishing: 'Hello World: 9'
Sep 24 23:10:29 1ebd9147068c local1.info: talker[8759]: [INFO] [1727219429.266762235] [talker]: Publishing: 'Hello World: 10'
Sep 24 23:10:30 1ebd9147068c local1.info: talker[8759]: [INFO] [1727219430.266693370] [talker]: Publishing: 'Hello World: 11'
Sep 24 23:10:31 1ebd9147068c local1.info: talker[8759]: [INFO] [1727219431.266688295] [talker]: Publishing: 'Hello World: 12'
Sep 24 23:10:32 1ebd9147068c local1.info: talker[8759]: [INFO] [1727219432.266742917] [talker]: Publishing: 'Hello World: 13'
Sep 24 23:10:33 1ebd9147068c local1.info: talker[8759]: [INFO] [1727219433.266660773] [talker]: Publishing: 'Hello World: 14'
Sep 24 23:10:34 1ebd9147068c local1.info: talker[8759]: [INFO] [1727219434.266736714] [talker]: Publishing: 'Hello World: 15' but with --- stderr: rcl
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
collect2: error: ld returned 1 exit status
gmake[2]: *** [test/CMakeFiles/test_rmw_impl_id_check_exe.dir/build.make:129: test/test_rmw_impl_id_check_exe] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:306: test/CMakeFiles/test_rmw_impl_id_check_exe.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
... i think that we have ABI/API incompatible issue here. 1st i will check that with source build with |
@david-vexev can you try with |
Thanks @fujitatomoya - I checked out the humble branch into my test_logger project (with rcl and rcl_logging_syslog cloned into it), then |
@david-vexev that works as expected, if you are good, can you close this issue? |
Thanks for your help! |
Hey there. Thanks for your work on this project - we're keen to try it out. Would you be able to troubleshoot our installation of
rcl_logging_syslog
? We don't seem to persist ros2 logs in/var/log/ros
or get them to surface into fluentbit as per the setup instructions.Environment:
Ubuntu 22.04.4
ROS2 version:
Humble
Steps followed:
systemctl status rsyslog
rcl_logging_syslog
cloned into workspace repo, i.e.our_ros2_project/src/rcl_logging_syslog
6a) Also tried other LOCAL configurations 0 to 7 and all mentioned facilities
/etc/rsyslog.d/
Here is the file:
/opt/fluent-bit/bin/fluent-bit --config=./fluent-bit.conf
No rsyslog forwarded logs observed in fluentbit and no ros2 logs appear in /var/log/ros locations
I'm not sure where
rcl_logging_syslog
wants to export logs to. Default log locations for ros2 were in the user home directory, so should the rsyslog locations such as/var/log/ros/2024/09/04/tomoyafujita/talker_428151.log
actually point to/home/me/.ros/log/...
instead? I can see my talker logs persisting to:talker_1443674_1726813326477.log
after rcl_logging_syslog has been built and run, so I tried changing the rsyslog TemplateName2 to my home directory ros log location/home/me/.ros/log/%programname%_%procid%_%$now%.log
but that didn't seem to help - no logs in /var/log, nothing in fluentbit.Also, should
RCL_LOGGING_SYSLOG_FACILITY
and the local1 entries in the rsyslog.d config file match i.e. if we choose LOCAL1, it will match the local1 entry?Any help is appreciated, thank you
The text was updated successfully, but these errors were encountered: