Java Code Examples for org.apache.logging.log4j.Level#ALL
The following examples show how to use
org.apache.logging.log4j.Level#ALL .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LogTypeConverter.java From teku with Apache License 2.0 | 6 votes |
@Override public Level convert(String value) { switch (value.toUpperCase()) { case "OFF": return Level.OFF; case "FATAL": return Level.FATAL; case "WARN": return Level.WARN; case "INFO": return Level.INFO; case "DEBUG": return Level.DEBUG; case "TRACE": return Level.TRACE; case "ALL": return Level.ALL; } throw (new CommandLine.TypeConversionException( "'" + value + "' is not a valid log level. Supported values are [OFF|FATAL|WARN|INFO|DEBUG|TRACE|ALL]")); }
Example 2
Source File: DefaultLogger.java From ymate-platform-v2 with Apache License 2.0 | 6 votes |
public static Level __parseLogLevel(LogLevel level) { switch (level.getLevel()) { case 600: return Level.TRACE; case 500: return Level.DEBUG; case 400: return Level.INFO; case 300: return Level.WARN; case 200: return Level.ERROR; case 100: return Level.FATAL; case 0: return Level.OFF; default: return Level.ALL; } }
Example 3
Source File: MixinPlatformAgentFMLLegacy.java From Mixin with MIT License | 6 votes |
@Override public void append(LogEvent event) { if (event.getLevel() != Level.DEBUG || !"Validating minecraft".equals(event.getMessage().getFormattedMessage())) { return; } // transition to INIT this.delegate.accept(Phase.INIT); // Only reset the log level if it's still ALL. If something // else changed the log level after we did, we don't want // overwrite that change. No null check is needed here // because the appender will not be injected if the log is // null if (MixinPlatformAgentFMLLegacy.log.getLevel() == Level.ALL) { MixinPlatformAgentFMLLegacy.log.setLevel(MixinPlatformAgentFMLLegacy.oldLevel); } }
Example 4
Source File: LoggerConfigBenchmark.java From logging-log4j2 with Apache License 2.0 | 5 votes |
@Setup public void setup() { listAppender.start(); final AppenderControl control = new AppenderControl(listAppender, Level.ALL, null); appenderSet.add(control); }
Example 5
Source File: DiscardingAsyncQueueFullPolicyTest.java From logging-log4j2 with Apache License 2.0 | 5 votes |
@Test public void testGetRouteDiscardsIfThresholdCapacityReachedAndLevelEqualOrLessSpecificThanThreshold() throws Exception { final DiscardingAsyncQueueFullPolicy router = new DiscardingAsyncQueueFullPolicy(Level.WARN); for (final Level level : new Level[] {Level.WARN, Level.INFO, Level.DEBUG, Level.TRACE, Level.ALL}) { assertEquals(level.name(), EventRoute.DISCARD, router.getRoute(currentThreadId(), level)); assertEquals(level.name(), EventRoute.DISCARD, router.getRoute(otherThreadId(), level)); assertEquals(level.name(), EventRoute.DISCARD, router.getRoute(currentThreadId(), level)); assertEquals(level.name(), EventRoute.DISCARD, router.getRoute(otherThreadId(), level)); } }
Example 6
Source File: DiscardingAsyncQueueFullPolicyTest.java From logging-log4j2 with Apache License 2.0 | 5 votes |
@Test public void testGetRouteDiscardsIfQueueFullAndLevelEqualOrLessSpecificThanThreshold() throws Exception { final DiscardingAsyncQueueFullPolicy router = new DiscardingAsyncQueueFullPolicy(Level.WARN); for (final Level level : new Level[] {Level.WARN, Level.INFO, Level.DEBUG, Level.TRACE, Level.ALL}) { assertEquals(level.name(), EventRoute.DISCARD, router.getRoute(currentThreadId(), level)); assertEquals(level.name(), EventRoute.DISCARD, router.getRoute(otherThreadId(), level)); } }
Example 7
Source File: AbstractCustomConfigurationFactoryTemplate.java From xian with Apache License 2.0 | 4 votes |
protected Level level() { return Level.ALL; }
Example 8
Source File: Log4j2LoggingHelper.java From herd with Apache License 2.0 | 4 votes |
/** * Converts a generic log level to a Log4J specific log level. * * @param logLevel the generic log level. * * @return the Log4J specific log level. */ private Level genericLogLevelToLog4j(LogLevel logLevel) { Level level = Level.ALL; if (logLevel.equals(LogLevel.OFF)) { level = Level.OFF; } else if (logLevel.equals(LogLevel.FATAL)) { level = Level.FATAL; } else if (logLevel.equals(LogLevel.ERROR)) { level = Level.ERROR; } else if (logLevel.equals(LogLevel.WARN)) { level = Level.WARN; } else if (logLevel.equals(LogLevel.INFO)) { level = Level.INFO; } else if (logLevel.equals(LogLevel.DEBUG)) { level = Level.DEBUG; } else if (logLevel.equals(LogLevel.TRACE)) { level = Level.TRACE; } else if (logLevel.equals(LogLevel.ALL)) { level = Level.ALL; } else { LOGGER.warn("Unsupported log level encountered: " + logLevel.toString() + ". Using ALL."); } return level; }
Example 9
Source File: ReadCountCollectionUtilsUnitTest.java From gatk-protected with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public Level getLevel() { return Level.ALL; }
Example 10
Source File: HDF5PCACoveragePoNCreationUtilsUnitTest.java From gatk-protected with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public Level getLevel() { return Level.ALL; }
Example 11
Source File: OneShotLoggerTest.java From gatk with BSD 3-Clause "New" or "Revised" License | 4 votes |
public StorageLogger() { super("", Level.ALL, false, false, false, false, "", null, new PropertiesUtil(new Properties()), null); }