Ask Your Question

How do I avoid writing into /var/log/syslog?

asked 2021-01-11 06:16:37 -0500

gbohus gravatar image


Setup: Ubuntu 18.04, ROS Melodic

I have a script in /usr/sbin/ which calls roslaunch to start up my nodes. (This is called from a service at boot time.) After setting up the environment, this is the actual command:

/opt/ros/melodic/bin/roslaunch pi top_level.launch > /dev/null &

A lot of my ros logs end up in /var/log/syslog. What's the best way to avoid writing into syslog and direct all the logs into the usual ~/.ros/log directory?


edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2021-01-13 09:10:38 -0500

gbohus gravatar image

I'm not sure if this is the canonical way, but I changed the script to

ts=`date +'%Y-%m-%d-%H-%M-%S'`
/opt/ros/melodic/bin/roslaunch pi top_level.launch &> $ROS_HOME/log/roslaunch_$ts.log &
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-01-11 06:16:37 -0500

Seen: 30 times

Last updated: Jan 13