Hi,

I can finally hack at Logkit again and want to update CVS to the latest
that is on harddisk.

I just committed a change that allows multiple independent log hierarchies
without interaction. All the methods in LogKit now delegate to a default
LogEngine. (The method call will be inlined as they are static final
methods). The only change that is not backwards compatible is the change to
constructors of Logger (add an extra parameter) which should probably be
protected/package scope anyway.

Some other changes that I was thinking about making. Add in a
PriorityFilter LogTarget so that you can simply go

LogTarget target = new PriorityFilter( Priority.ERROR, realLogTarget );

thus anything with priority >= ERROR would be passed through to
realLogTarget. I will also add in a new AsyncLogTarget that has been
meaning to go in for about six months (basically logs in another thread).
If anyone else has any general logtargets they want added in now is the
time to do it ;)

Another change I was considering but are not sure about is making each
Logger only have 1 LogTarget. It originally had multiple logtargets because
I was in a servlet environment and needed to sometimes log to servlet log
and sometimes to a custom log.

What I could do is optimize for the 1 logger == 1 logTarget case and have
another logtarget that actually writes to many other log targets. So in
code-speak this would amount to

final LogTarget target = 
  new MultiLogTarget( new LogTarget[] { target1, target2, target 3 } );

This would make it faster for single logtarget case but a bit slower for
multiple logtargets. Question is what pattern is more common? Multi or
single? Thoughts?


Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to