Solved

Java asynchronous logging

Posted on 2016-10-13
4
35 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
4 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 26

Accepted Solution

by:
dpearson earned 500 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
scoreUp challenge 14 48
noX challenge 17 77
What is the latest versions eclipse neon 2 122
what is a "java.lang.System Property"   ? 20 41
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now