0
$\begingroup$

Rosanswers logo

I have logging in my cpp files, like the following, and I'm trying to get the messages to appear in a file.

ROS_INFO_STREAM("testing");

I have these env vars to show where the logs should be placed, and how to config logging.

ROS_LOG_DIR = /tmp/node/etc/logs
ROSCONSOLE_CONFIG_FILE = /tmp/node/etc/rosconsole.config

And within the rosconsole.config file I have the following.

log4j.logger.ros=DEBUG

Any thoughts as to why I don't see my output in log files?


Originally posted by SRD on ROS Answers with karma: 13 on 2017-02-17

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

you should define it in the config file, like this

log4j.logger.ros.log_test=WARN,rosout_a log4j.appender.rosout_a=org.apache.log4j.RollingFileAppender log4j.appender.rosout_a.Threshold=WARN log4j.appender.rosout_a.Append=true log4j.appender.rosout_a.File=/home/name/output.txt


Originally posted by rjosodtssp with karma: 28 on 2018-11-05

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.