com.atlassian.confluence.util.test.rules
Class Log4JLogger

java.lang.Object
  extended by com.atlassian.confluence.util.test.rules.AnnotatedMethodTemplate<Log4JLogger.Record>
      extended by com.atlassian.confluence.util.test.rules.Log4JLogger
All Implemented Interfaces:
org.junit.rules.TestRule

public class Log4JLogger
extends AnnotatedMethodTemplate<Log4JLogger.Record>

Record the logging output for a given (class) logger.

Usage:

 {@code public class MyTest
   {

Since:
5.4

Nested Class Summary
static class Log4JLogger.LogLevel
           
static interface Log4JLogger.Record
           
 
Field Summary
protected  org.apache.log4j.Layout layout
           
 
Fields inherited from class com.atlassian.confluence.util.test.rules.AnnotatedMethodTemplate
annotationClass, testClass
 
Constructor Summary
Log4JLogger(java.lang.Class testClass)
           
Log4JLogger(java.lang.Class testClass, org.apache.log4j.Layout layout)
           
 
Method Summary
protected  org.junit.runners.model.Statement applyForAnnotation(org.junit.runners.model.Statement statement, org.junit.runner.Description description, Log4JLogger.Record record)
           
 java.lang.String snapshot()
           
 
Methods inherited from class com.atlassian.confluence.util.test.rules.AnnotatedMethodTemplate
apply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

layout

protected final org.apache.log4j.Layout layout
Constructor Detail

Log4JLogger

public Log4JLogger(java.lang.Class testClass)

Log4JLogger

public Log4JLogger(java.lang.Class testClass,
                   org.apache.log4j.Layout layout)
Method Detail

applyForAnnotation

protected org.junit.runners.model.Statement applyForAnnotation(org.junit.runners.model.Statement statement,
                                                               org.junit.runner.Description description,
                                                               Log4JLogger.Record record)
Specified by:
applyForAnnotation in class AnnotatedMethodTemplate<Log4JLogger.Record>

snapshot

public java.lang.String snapshot()


Copyright © 2003-2014 Atlassian. All Rights Reserved.