Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 895
  • Last Modified:

Log4J parameters

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
ams7503
Asked:
ams7503
1 Solution
 
cmalakarCommented:
User org.apache.log4j.Logger class and its getAppender or getAllAppenders method to find out the configured appenders
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now