Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Java asynchronous logging

Posted on 2016-10-13
4
Medium Priority
?
122 Views
Last Modified: 2016-10-27
Hi Experts

Is there a logging tool such a log4j which does logging asynchronously? Or is there a wrapper to achieve this and how?
0
Comment
Question by:jw124210
3 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 41841685
What makes you think it's not asynchronous? I would think that log4j (though theoretically superseded by 'logback') already optimises performance with the use of threading. The initial call might be on the same thread but probably doesn't remain so in the implementation. Anything else would be
a. unnecessary as the performance gain would be vanishingly small
b. make the framework difficult to use
0
 
LVL 28

Accepted Solution

by:
dpearson earned 2000 total points
ID: 41842195
lo4j2 has both AsyncAppender and AsyncLogger classes - which use a separate thread to do the logging.

log4j (the earlier version) did not support those as far as I know.

Details are here:
https://logging.apache.org/log4j/2.x/manual/async.html

Doug
1
 

Author Closing Comment

by:jw124210
ID: 41863437
Thank you
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question