Ask Your Question
0

Guideline/rule for logging when using 3rd party libraries/framework?

asked 2012-10-24 06:42:31 -0500

130s gravatar image

updated 2012-10-24 10:11:04 -0500

For example, when writing a plugin for rqt (aka ROS GUI) that's inherently dependent on Qt, I think there's 2 choice for logging, since both ROS and Qt have logging mechanism.

In the cases like above, which logging mechanism should we use? Or in which case do we stick to ROS or to the others?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-10-25 09:24:45 -0500

130s gravatar image

updated 2012-11-10 09:04:24 -0500

Self response. Not a ROS general guideline/rule/best practice or anything but I found this could be a good example:

rqt's API review says,

2. Question / concerns / comments
:
2
(Dirk) I would propose to not integrate logging functionality into ROS GUI. All ROS plugins can use the ROS-specific logging functionality provided by the client libraries. A plugin similar to rxconsole can then be used to show/filter all these messages. Non-ROS plugins can decide if they want to use logging library or stick with the Qt functions qDebug, qWarning, qCritical. 
:
3. Conclusion
:
ROS GUI does not provide logging funtionality but relies on either the Qt or the ROS logging functions (following the KISS principle)

So at least rqt doesn't restrict which logging system to use.

Meanwhile in qt_gui_core, Qt's command qDebug is in use http://goo.gl/Oz5uU.

Don't know if this attitude holds for the entire ROS system though.

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

Stats

Asked: 2012-10-24 06:42:31 -0500

Seen: 718 times

Last updated: Nov 10 '12