[Rock-dev] Standard logging for orogen tasks

Sylvain Joyeux sylvain.joyeux at dfki.de
Tue Jun 21 17:09:28 CEST 2011


On 06/21/2011 04:59 PM, S Roderick wrote:
>> 1) fprintfs / std::cout / std::cerr.
>> Often used for practically reason, probably when the module is used in a
>> script. Unfortanetely, I guess
>> these message could be missed very fast, when the task is used in the
>> supervision, which produces
>> a very large set of output messages
>>
>> 2) RTT::log
>> I used this in the beginning of my job here at the DFKI. But I have
>> currently no clue how to handle
>> the log level from a script or how it is handled by the supervision.
>>
>> 3) base/logging.h
>> Another logging api written by Thomas which seems very flexible as
>> replacement for log4cpp
>> (compile-time and environmental (ENV_VAR) controllable log-level)
>
> I don't know anything about #3, but the other two are completely not real-time. There is real-time logging built into RTT and OCL, but I don't know how/whether that is exposed in Rock.
I concur that none of them is compatible with real-time.

Now, from the Rock point of view:

1/ the data handling infrastructure is good enough that text logging
    should be the exception, not the norm. This is simply because one
    can then look into live data easily, and not rely on parsing text
    to analyze the data.
2/ I'm personally not against text logging per se (even though I
    strongly encourage my project members to use a lot less of it). I
    don't have time to look into seamless integration of real-time
    logging, though ...
3/ real-time logging cannot be put into libraries without adding a big
    dependency on OCL

I would say that, in Rock these days, Thomas' logging class should be used.

Sylvain


More information about the Rock-dev mailing list