2

We would like to use Log4J's "AsynchAppender" within our Java EE application. The application is deployed on a Glassfish V2 app-server.

Log4J's "AsynchAppender" is based on a thread implementation. Threads in turn should be avoided within Java EE applications. Are there any experiences using the "AsynchAppender"? What are best practices doing asynchronous logging using Log4J in Java EE applications?

1 Answer 1

2

You can use log4j AsyncAppender to log asynchronous way in your J2EE applications.

AsyncAppender collects the events sent to it and then dispatch them to all the real appenders that are referred.It uses a separate thread to serve the events in its buffer.Implementing thread calls in request handler is generally discouraged in J2EE applications. Best practice is to dedicate logging as separate service which will handles all logs of that application.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.