Hi All, This is the first time I am posting any messages to any forums . Hope someone may reply soon .
My Problem is how to add log4j messages to the Swing Jtextfield. How to use LF5Appender to add the messages to swing component. I have tried many things but It is not working . Like one of the vague trial was to add the messages to the file and then read from the file but that would read old messages not the new ones which will be written . plus lots of other problems (null vlaues etc.) Is there any way where I can directly guide my Logger messages to the swing JTextField or any other component without going to any other file etc.
i don't know if you have run the examples included in the dist, but the bulk of the lf5 stuff is for logging to the lf5 gui console.
i don't think any of the lf5 packages is tailored to directly talk to misc swing component, but they do give you alternatives: you can pick up log messages from a socket, or from a database.
jswat is a good example - it can be configured for debugging using socket ipc
another option would be to write a wrapper to "tee" log messages to your app and also to log4j. [if you're familiar with the unix tee cmd...]
in unix, you have plenty of ipc options. but i must comment that this is potentially a very io-intensive task for a swing app, especially if you plan to handle it in a jtextfield - i think you'll prefer lf5 console once the swing q gets bottlenecked but