Ask Your Question
3

Format console timestamp

asked 2016-06-06 06:13:40 -0500

langsware gravatar image

Hi, We are facing non-human looking timestamp output in the console:

[ INFO] [1465210897.698024206]: Some log msg

while nicely readable in the log files:

[roslaunch][INFO] 2016-06-06 12:35:22,972: Some other log msg

My rosconsole.conf is found and responds on log-level settings. Unfortunately any attempt to format the console timestamp format fails.

log4j.logger.ros=INFO
log4j.logger.ros.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

How to control this behaviour?

edit retag flag offensive close merge delete

Comments

I would greatly appreciate something like this. I use robot upstart which dumps all the rosout lines into a single file. Its really hard to tell when a run took place since all of them get put into the same file.

shoemakerlevy9 gravatar image shoemakerlevy9  ( 2017-04-10 14:42:15 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-06-06 06:46:52 -0500

updated 2016-06-06 06:52:03 -0500

That's a common request (see this and this question). Doesn't look as if there's an solution, because nobody implemented this yet. If you are willing to contribute, a pull request would probably be appreciated.

P.S.: Personally, I find the "non-human-readable" time format more useful, since that's what's in the message headers and what you get in your code. But this is a matter of personal taste or use case and should be configurable.

edit flag offensive delete link more

Comments

As long as I do not have to read the log files manually the "non-human-readable" format is ok for me as well. Where is this ROS time format specified and how could I convert it using a Python script to e.g. parse log files?

thinwybk gravatar image thinwybk  ( 2017-10-12 10:03:59 -0500 )edit

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: 2016-06-06 06:13:40 -0500

Seen: 2,035 times

Last updated: Jun 06 '16