| 1 | |
package com.nexwerk.log4junit; |
| 2 | |
|
| 3 | |
import com.nexwerk.log4junit.log4j.JUnitAppender; |
| 4 | |
import com.nexwerk.log4junit.log4j.DefaultJUnitAppender; |
| 5 | |
import org.apache.log4j.BasicConfigurator; |
| 6 | |
import org.apache.log4j.Level; |
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | 1 | public class DefaultLog4jTest implements Log4jTest { |
| 14 | 1 | protected static JUnitAppender log = new DefaultJUnitAppender(); |
| 15 | |
|
| 16 | |
static { |
| 17 | 1 | BasicConfigurator.configure(log); |
| 18 | 1 | } |
| 19 | |
|
| 20 | |
public void record() { |
| 21 | 3 | log.startRecording(); |
| 22 | 3 | } |
| 23 | |
|
| 24 | |
public void stop() { |
| 25 | 3 | log.stopRecording(); |
| 26 | 3 | } |
| 27 | |
|
| 28 | |
public void setThreshold(Level level) { |
| 29 | 1 | log.setLogLevelThreshold(level); |
| 30 | 1 | } |
| 31 | |
} |