ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

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.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

How to control this behaviour?

edit retag flag offensive close merge delete


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

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


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

Question Tools



Asked: 2016-06-06 06:13:40 -0500

Seen: 2,861 times

Last updated: Jun 06 '16