Re: Proposal for 2.8: Glog



On Wednesday 04 May 2005 14:15, Matthias Clasen wrote:

> If log categories are valuable, how about adding simple category support
> to g_log, instead of adding a clone of the (IMO) somewhat overengineered
> log4x stuff ?

GLog isn't really a log4* clone. It does logging and it does have categories, 
yes, but that doesn't make it a clone yet. GLog does not have appenders, it 
does not have configurable layouters, nor does it use a config file. Also, 
categories in GLog do not have hierarchical relationships, they are just 
simple names.

Looking at log4c, I feel GLog gets the balance pretty much right. It's simple 
and straight forward and more powerful than g_log(), but not overengineered 
(with 500 lines of code plus convenience macros there isn't too much danger 
of that).

More importantly, GLog was designed with the GObject type system in mind. One 
might even want to extend that a little bit and provide an additional hook to 
register custom per-GType print functions or something like that.


I am not sure how it is possible to extend the existing g_log() system in a 
backwards-compatible way without ending up with something pretty close to 
GLog, but maybe that's just my lack of creativity :-)

Cheers
 -Tim



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]