public class

Log4jLogger

extends TestWatcher
java.lang.Object
   ↳ org.junit.rules.TestWatcher
     ↳ com.atlassian.jira.junit.rules.Log4jLogger

Class Overview

Watches log4j logs. This can be used to spy on log4j or slf4j when testing.

Summary

Public Constructors
Log4jLogger(String category)
Creates a watcher of the given category
Log4jLogger()
Creates a watcher of the root category
Log4jLogger(Class<?> clazz)
Creates a watcher of the given class category
Public Methods
String getMessage()
void reset()
void setLevel(Level level)
Protected Methods
void finished(Description description)
void starting(Description description)
[Expand]
Inherited Methods
From class org.junit.rules.TestWatcher
From class java.lang.Object
From interface org.junit.rules.TestRule

Public Constructors

public Log4jLogger (String category)

Creates a watcher of the given category

Parameters
category the category to watch

public Log4jLogger ()

Creates a watcher of the root category

public Log4jLogger (Class<?> clazz)

Creates a watcher of the given class category

Parameters
clazz the class category to watch

Public Methods

public String getMessage ()

public void reset ()

public void setLevel (Level level)

Protected Methods

protected void finished (Description description)

protected void starting (Description description)