I'm looking at creating a logging package for our applications (web & non-web). The reason for yet-another-logger is that I want discreet logging types, not hierarchical levels. I've built this kind of a package before for previous projects, and ended up building the whole thing because I didn't think log4j could do what I wanted (that was several years ago). Now I'm building another one, and looking at the current version of log4j, and having read much of Ceki's book (which I highly recommend!), I'm thinking that there's got to be a way of re-configuring (bending?) log4j to do what I need. I don't think it's that far off.
Basically, I want to be able to enable/disable logging for a particular class or package by type, and each type is totally independent of every other type. Some examples of types might be: Fatal, Error, Timing, CodeBlock, ControlPoint, DBAccess, Info, etc. There is no implicit "ordering" between these various types, so "levels" are inappropriate. What I want to be able to do is to turn on/off each type independently, so that I can turn on Timing without having to also turn on Info, or be able to turn on CodeBlock without turning on Error. I also want the users of my package to be able to define additional types and register them with the logger at runtime (via code or xml ???). Oh yeah, I also need to have the logger reload the config file (or some portion of it) on a regular basis so that we can change the enabled types without bouncing the app-server or restarting the application.
I was thinking if I tried to tie all my "types" to a single "level", and did something with the log-level filtering to enable/disable by package or class, that would get me close. I'm not sure how I'd tie in the "type". I'd probably have to programatically update the log-level filters with updates to handle config changes at runtime.
Thoughts, ideas, concerns??? Any comments are gratefully accepted! :)
--- regards --- Larry
--------------------------
Larry Young
The Dalmatian Group
www.dalmatian.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]