OFF
FATAL
ERROR
WARN
INFO
DEBUG
TRACE
ALL
The Level class may be subclassed to define a larger level set. @author Ceki Gülcü @author Yoav Shapira
Level
125126127128129130131132133134135136
} public void testLog4JLoggerDebugWithExceptionEnabled() throws Exception { final Level level = Level.DEBUG; final Level type = Level.DEBUG; final String message = "Meep!"; final Throwable throwable = new Throwable(); final boolean output = true; final MockAppender target = new MockAppender();
140141142143144145146147148149150
} public void testLog4JLoggerDebugWithExceptionDisabled() throws Exception { final Level level = Level.ERROR; final String message = "Meep!"; final Throwable throwable = new Throwable(); final MockAppender target = new MockAppender(); final Log4JLogger logger = createLogger( target, level );
153154155156157158159160161162163164
} public void testLog4JLoggerInfoEnabled() throws Exception { final Level level = Level.DEBUG; final Level type = Level.INFO; final String message = "Meep!"; final Throwable throwable = null; final boolean output = true; final MockAppender target = new MockAppender();
168169170171172173174175176177178
} public void testLog4JLoggerInfoDisabled() throws Exception { final Level level = Level.ERROR; final String message = "Meep!"; final MockAppender target = new MockAppender(); final Log4JLogger logger = createLogger( target, level ); logger.info( message );
180181182183184185186187188189190191
} public void testLog4JLoggerInfoWithExceptionEnabled() throws Exception { final Level level = Level.DEBUG; final Level type = Level.INFO; final String message = "Meep!"; final Throwable throwable = new Throwable(); final boolean output = true; final MockAppender target = new MockAppender();
195196197198199200201202203204205
} public void testLog4JLoggerInfoWithExceptionDisabled() throws Exception { final Level level = Level.ERROR; final String message = "Meep!"; final Throwable throwable = new Throwable(); final MockAppender target = new MockAppender(); final Log4JLogger logger = createLogger( target, level );
208209210211212213214215216217218219
} public void testLog4JLoggerWarnEnabled() throws Exception { final Level level = Level.DEBUG; final Level type = Level.WARN; final String message = "Meep!"; final Throwable throwable = null; final boolean output = true; final MockAppender target = new MockAppender();
223224225226227228229230231232233
} public void testLog4JLoggerWarnDisabled() throws Exception { final Level level = Level.ERROR; final String message = "Meep!"; final MockAppender target = new MockAppender(); final Log4JLogger logger = createLogger( target, level ); logger.warn( message );
235236237238239240241242243244245246
} public void testLog4JLoggerWarnWithExceptionEnabled() throws Exception { final Level level = Level.DEBUG; final Level type = Level.WARN; final String message = "Meep!"; final Throwable throwable = new Throwable(); final boolean output = true; final MockAppender target = new MockAppender();
250251252253254255256257258259260
} public void testLog4JLoggerWarnWithExceptionDisabled() throws Exception { final Level level = Level.ERROR; final String message = "Meep!"; final Throwable throwable = new Throwable(); final MockAppender target = new MockAppender(); final Log4JLogger logger = createLogger( target, level );