You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Mentzner, Volker" <V....@PSI-BT.de> on 2002/07/25 14:29:24 UTC

[SUBMIT] logging to GUI elements like JLabel, JList, JTable or JT extArea and appender for dialogs

Hi,

sometimes people ask for appenders to log into GUI elements. Here is my
solution developed
for my standalone java gui applications.
It consists of an appender for swing and awt components like JLabel, JList
or JTable (and
many more....) and an appender for dialogs.
You can use the dialog appender with one of 3 dialog types (all are
included:
SingleDetailDialog (attached picture!), SimpleListDialog (attached picture!)
and SimpleTableDialog).
The dialogs support printing, maybe an interesting feature.
The package has been tested with java 1.3 and log4j 1.1.3. A sample is
included (attached picture!).

Until now it does not support log4j 1.2.x because there is one great
problem:
In the LoggingEvent class the "priority" field has changed to "level" from
log4j v1.1.x to v1.2.x.
There are no setPriority() or getPriority() methods in both version. That
makes big difficulties,
because I can can support only log4j v1.1.x (using priority) or v1.2.x
(using level) but not both.
Ceki often writes that v1.2 is a drop in replacement for v1.1, but this
seams to be true only if
you don't write any log4j extensions...
Any comments, solutions or ideas on this topic?

Another question: Why is the Priority.getAllPossiblePriorities() method
marked deprecated without
any replacement or ..Level-alternative?

 <<base4jlog.zip>>  <<SampleProgram.jpg>>  <<SimpleList.jpg>>  
<<SingleDetail.jpg>> .
Ceki and other committers,

if you like the package, please put it under my contrib directory
(VolkerMentzner).
Or maybe you want to rivive the log4j/gui subdirectory that existed years
ago?  ;-)
If you want to do so, let me know, then I can adjust the package name.

Greetings from D�sseldorf

Volker Mentzner