Solved

Log4J parameters

Posted on 2007-11-19
1
838 Views
Last Modified: 2012-05-05
I am using log4J for logging. Is there a way to determine, how log4J saves these parameters,so that I can perform some sort of testing.
This is what I would like to do: I have various appenders, which are defined in the log4J configuration- so for my Junit test cases, I would like to call say method a ,which uses one sort of appender- then I would like to check and see if what log4j is using is the same sort of appender.This way,if anyone changes the config then this test would fail.
Thanks
0
Comment
Question by:ams7503
1 Comment
 
LVL 23

Accepted Solution

by:
cmalakar earned 50 total points
ID: 20318085
User org.apache.log4j.Logger class and its getAppender or getAllAppenders method to find out the configured appenders
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
The viewer will learn how to implement Singleton Design Pattern in Java.

760 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

20 Experts available now in Live!

Get 1:1 Help Now