S
simonboland
I have a multithreaded application that executes several tasks in
parallel. Each task involves telnet and FTP connections and each task
is executed using a new thread. The overall application is controlled
using RMI.
The application must be able to retrieve the log entries for a given
task. This means retrieving the log entries for a given thread.
Furthermore this has to be performed synchronously by polling at
regular intervals to return the newest log entries.
I'm considering using the Log4j library by extending an appender and
using a pattern layout for formatting. What I need is a sort of a
memory appender which saves the log entries for each thread in a
buffer. It would then need to return the newest entries upon each
call.
A few questions:
1) Are there better alternatives to log4J?
2) Should I use one Log4j instance with multiple memory appenders for
each thread? This means I need to manage these with a list of
appenders.
3) Is there a better way by using multiple instances of Log4j, i.e. one
for each thread?
Thanks.
parallel. Each task involves telnet and FTP connections and each task
is executed using a new thread. The overall application is controlled
using RMI.
The application must be able to retrieve the log entries for a given
task. This means retrieving the log entries for a given thread.
Furthermore this has to be performed synchronously by polling at
regular intervals to return the newest log entries.
I'm considering using the Log4j library by extending an appender and
using a pattern layout for formatting. What I need is a sort of a
memory appender which saves the log entries for each thread in a
buffer. It would then need to return the newest entries upon each
call.
A few questions:
1) Are there better alternatives to log4J?
2) Should I use one Log4j instance with multiple memory appenders for
each thread? This means I need to manage these with a list of
appenders.
3) Is there a better way by using multiple instances of Log4j, i.e. one
for each thread?
Thanks.