Solved

Java asynchronous logging

Posted on 2016-10-13
4
66 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 27

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

830 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