Hi,
When hacking at the code I decided that I may aswell go through my whole
list of things to do for logkit. The list of changes is in
src/xdocs/ChangeLog.txt. It is essentially a fair bit faster again but it
also uses more memory to cache information. (And it passes all
recomendations for JLS - yea !).
It is also a lot cleaner semantically and should be easier to use (less
unused abstractions). I have left the ContextStack in even though it is in
hindsight a bad idea mainly because I feel uncomfortable removing
functionality that is likely to used by logging clients.
A few newish ideas popped into my mind when looking at the code.
* Firstly: do we still need LogKit class. It was originally intended to be
access point of all facilities but at the moment all it's methods delegate
to other classes.
* Secondly: do we need global hierarchies? It was originally implemented so
you could easily disable the whole logging process to a certain level.
Prioritys are checked against minimum of global + category priority. I just
implemented
boolean recurse = true;
logger.unsetPriority( recurse );
which recursively unsets the priority of logger and all sub-loggers. This
means that all these loggers will get the same priority as their parent. So
you can disable whole hierarchies via
boolean recurse = true;
logger.unsetPriority( recurse );
logger.setPriority( Priority.ERROR );
Which first unsets all sub-loggers and makes sure their parent (ie the
current logger) has error priority. Thus they all inherit this error
priority.
So in a way we no longer need global priorities - unless we want to be able
to shutdown logging, start it up again and still "remember" the original
priorities. We can either re-read log config file or keep global priority
if this is a possible use case. (I don't use it in any of my code - can
anyone see any use for it?).
So if we can't find a valid use for it I would like to remove global
priorities - anyone have a problem with that ?
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]