[Openais] [patch] improved logging and tracing support
Hans.Feldt at ericsson.com
Thu Apr 27 01:48:46 PDT 2006
Here's a new patch with:
- a fix for the problem described below
- rests of old logging removed from all code (#define LOG_SERVICE...)
- line feed added if not in message
- new trace function added so that trace macros adds minimum of code and =
runtime penalties to user code.
- ENTER_ARGS macro changed to ENTER. ENTER macro now requires arguments. =
I have seen this to be the most likely case. ENTER_VOID macro created.
Steven Dake wrote:
> On Wed, 2006-04-19 at 08:24 +0200, Hans Feldt wrote:
>>Steven Dake wrote:
>>>The patch looks great
>>>I noticed one small bug it appears logging configuration should be setup
>>>before other operations. Example:
>>>[SERV ] openais component openais_cpg loaded.
>>>Apr 18 12:42:20.255558 [totemsrp.c:694] Token Timeout (1000 ms)
>>>retransmit timeout (238 ms)
>>>Note the fileline: on operation now changes over at the wrong time. I'd
>>>expect all printouts to be of the same format.
>>>A problem for another patch if you have time :)
>>I described it as a chicken and egg problem in my mail below. How do we =
>>solve it? The only thing as I see it is to buffer printouts until =
>>log_setup() has been called. At early exit (config errors etc.) the =
>>buffer has to be flushed.
> Good idea Hans,
> This seems like a reasonable approach. We know that we will have few
> messages to buffer before the actual log_setup call. At log_setup, we
> could flush any pending messages according to the log settings. We
> could also have a "log_flush" which would flush all messages to syslog,
> and errors to stderr.
>>>Committed at revision 995.
>>Thanks, I still haven't figured out the details how to commit to the =
>>repository but I am on to it.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 21754 bytes
Desc: not available
Url : http://lists.linux-foundation.org/pipermail/openais/attachments/20060=
More information about the Openais