org.opennms.test.mock
Class MockLogAppender
java.lang.Object
org.apache.log4j.AppenderSkeleton
org.opennms.test.mock.MockLogAppender
- All Implemented Interfaces:
- Appender, OptionHandler
public class MockLogAppender
- extends AppenderSkeleton
- Author:
- brozow
| Methods inherited from class org.apache.log4j.AppenderSkeleton |
activateOptions, addFilter, clearFilters, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold |
MockLogAppender
public MockLogAppender()
doAppend
public void doAppend(LoggingEvent event)
- Specified by:
doAppend in interface Appender- Overrides:
doAppend in class AppenderSkeleton
append
protected void append(LoggingEvent event)
- Specified by:
append in class AppenderSkeleton
close
public void close()
requiresLayout
public boolean requiresLayout()
resetEvents
public static void resetEvents()
getEvents
public static LoggingEvent[] getEvents()
getEventsGreaterOrEqual
public static LoggingEvent[] getEventsGreaterOrEqual(Level level)
setupLogging
public static void setupLogging()
setupLogging
public static void setupLogging(Properties config)
setupLogging
public static void setupLogging(boolean toConsole)
setupLogging
public static void setupLogging(boolean toConsole,
Properties props)
setupLogging
public static void setupLogging(boolean toConsole,
String level)
setupLogging
public static void setupLogging(boolean toConsole,
String level,
Properties config)
isLoggingSetup
public static boolean isLoggingSetup()
receivedLogLevel
public static void receivedLogLevel(Level level)
resetLogLevel
public static void resetLogLevel()
noWarningsOrHigherLogged
public static boolean noWarningsOrHigherLogged()
assertNotGreaterOrEqual
public static void assertNotGreaterOrEqual(Level level)
throws junit.framework.AssertionFailedError
- Throws:
junit.framework.AssertionFailedError
assertNoWarningsOrGreater
public static void assertNoWarningsOrGreater()
throws junit.framework.AssertionFailedError
- Throws:
junit.framework.AssertionFailedError
Copyright © 2009. All Rights Reserved.