Ask Your Question
0

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

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

gbohus gravatar image

Hey,

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?

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

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

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

2 followers

Stats

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

Seen: 13 times

Last updated: Jan 13