Hi, I just wanted to give a little back of what I've been doing.
I can say programmatic configuration the way it is is *really* hard.
Mostly it is hard because of
- having to import a million different things from different packages,
and you can never guess or remember which package it is going to be
- the creator methods take a million parameters
- appenders need to be added twice
- if you create an appender with the same name it will not add it but
give no error
- various static methods from different classes do important things, but
it is not centralized.
- maybe there is too much static in any case, but yeah.
JAnsi works. I'm doing stuff JAnsi does, and there is already an entire
package that does everything I would want or need to do :P. Go figure.
Now it is even included with my application just to make it work on
Windows, and I don't really want to use it with my default application
;-). (Maybe I'll have to, given that). Ooh but it doesn't do input
processing/filtering, I might even use it. (My library parses ANSI tokens).
Anyway to cut it short now, here is a screenshot of what I've been doing:
http://www.xen.dds.nl/f/i/screenshots/thunderbolt-log4j-reward.png
The first field is the thread in blue, there are three threads (thread
types): main, server and client. Every client thread gets numbered from
a pool that gets refilled when a thread exits (just a Set I take numbers
out of and I always take the first one (SortedSet/TreeSet)). After that
is the logger name. I don't name my loggers anymore by class but by
subsystem. Essentially, by package, I guess. There are only two packages
/ subsystems at the moment that are being shown a third is called
"telnet.file" and I haven't tested it yet.
It's just that my FileAppender doesn't yet work. However since it
"additives" from "telnet" it also outputs to the console:
http://www.xen.dds.nl/f/i/screenshots/thunderbolt-log4j-reward2.smaller.png
Fixed.
So I have 3 loggerconfigs now:
- "server" --> outputs to root logger
- "telnet" --> outputs to root logger
- "telnet.file" --> additionally outputs to a log file.
Regards, and enjoy :p.
Bart.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]