RE: [xml] release of libxml2-2.6.0beta3
- From: "Vakoc, Mark" <Mark_Vakoc jdedwards com>
- To: <veillard redhat com>, <xml gnome org>
- Subject: RE: [xml] release of libxml2-2.6.0beta3
- Date: Fri, 26 Sep 2003 10:20:15 -0600
How about support for logging levels, such as log4j and it's
derivatives
have? Something like an enum of log level debug,info,warning,
error,
fatal for each message?
Okay, why not, global or per-thread <grin/> ?
Why, whichever is more difficult of coure! I assume you mean the
ability to set thresholds for the level of messaging you want. The
advantage of having that in the library is you can prevent the
processing of the error message (essentially the sprintf all), which
could give you a slight performance boost and you can control it on a
thread level. The simple solution is to process all messages and leave
it up to whomever is using the callbacks to handle the thresholds
themselves. I think the prior is better but may be more difficult.
I had an old program that did that and used macros to prevent the
logging api from being called which improved cache hit levels, something
like
logMacro(level,a)
which evaluated to something like
if (level >= someThreshold) xmlLog(level,a);
The real annoying thing was that macros can't handle variable argument
lists so you ended up having to define a bunch like
logMacro2(level,a,b) == if (level >= someThreshold) xmlLog(level,a,b);
logMacro3(level,a,b,c) == if (level >= someThreshold)
xmlLog(level,a,b,c);
Hum, if you can get me a list of the places where this happen I can
probably get them fixed, yes.
I'll keep an eye out. XPath is the only place that comes to mind.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]