?
Solved

Log4J parameters

Posted on 2007-11-19
1
Medium Priority
?
884 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 100 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
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.
Suggested Courses

719 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