Solved

Log4J parameters

Posted on 2007-11-19
1
880 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

622 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