Java Code Examples for org.gradle.api.logging.LogLevel#compareTo()
The following examples show how to use
org.gradle.api.logging.LogLevel#compareTo() .
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: LogbackLoggingConfigurer.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
@Override public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) { Level loggerLevel = logger.getEffectiveLevel(); if (loggerLevel == Level.INFO && (level == Level.INFO || level == Level.WARN) || level == Level.INFO && (loggerLevel == Level.INFO || loggerLevel == Level.WARN)) { // Need to take into account Gradle's LIFECYCLE and QUIET markers. Whether those are set can only be determined // for the global log level, but not for the logger's log level (at least not without walking the logger's // hierarchy, which is something that Logback is designed to avoid for performance reasons). // Hence we base our decision on the global log level. LogLevel eventLevel = LogLevelConverter.toGradleLogLevel(level, marker); return eventLevel.compareTo(currentLevel) >= 0 ? FilterReply.ACCEPT : FilterReply.DENY; } return level.isGreaterOrEqual(loggerLevel) ? FilterReply.ACCEPT : FilterReply.DENY; }
Example 2
Source File: LogbackLoggingConfigurer.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
@Override public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) { Level loggerLevel = logger.getEffectiveLevel(); if (loggerLevel == Level.INFO && (level == Level.INFO || level == Level.WARN) || level == Level.INFO && (loggerLevel == Level.INFO || loggerLevel == Level.WARN)) { // Need to take into account Gradle's LIFECYCLE and QUIET markers. Whether those are set can only be determined // for the global log level, but not for the logger's log level (at least not without walking the logger's // hierarchy, which is something that Logback is designed to avoid for performance reasons). // Hence we base our decision on the global log level. LogLevel eventLevel = LogLevelConverter.toGradleLogLevel(level, marker); return eventLevel.compareTo(currentLevel) >= 0 ? FilterReply.ACCEPT : FilterReply.DENY; } return level.isGreaterOrEqual(loggerLevel) ? FilterReply.ACCEPT : FilterReply.DENY; }
Example 3
Source File: LogbackLoggingConfigurer.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
@Override public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) { Level loggerLevel = logger.getEffectiveLevel(); if (loggerLevel == Level.INFO && (level == Level.INFO || level == Level.WARN) || level == Level.INFO && (loggerLevel == Level.INFO || loggerLevel == Level.WARN)) { // Need to take into account Gradle's LIFECYCLE and QUIET markers. Whether those are set can only be determined // for the global log level, but not for the logger's log level (at least not without walking the logger's // hierarchy, which is something that Logback is designed to avoid for performance reasons). // Hence we base our decision on the global log level. LogLevel eventLevel = LogLevelConverter.toGradleLogLevel(level, marker); return eventLevel.compareTo(currentLevel) >= 0 ? FilterReply.ACCEPT : FilterReply.DENY; } return level.isGreaterOrEqual(loggerLevel) ? FilterReply.ACCEPT : FilterReply.DENY; }
Example 4
Source File: LogbackLoggingConfigurer.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
@Override public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) { Level loggerLevel = logger.getEffectiveLevel(); if (loggerLevel == Level.INFO && (level == Level.INFO || level == Level.WARN) || level == Level.INFO && (loggerLevel == Level.INFO || loggerLevel == Level.WARN)) { // Need to take into account Gradle's LIFECYCLE and QUIET markers. Whether those are set can only be determined // for the global log level, but not for the logger's log level (at least not without walking the logger's // hierarchy, which is something that Logback is designed to avoid for performance reasons). // Hence we base our decision on the global log level. LogLevel eventLevel = LogLevelConverter.toGradleLogLevel(level, marker); return eventLevel.compareTo(currentLevel) >= 0 ? FilterReply.ACCEPT : FilterReply.DENY; } return level.isGreaterOrEqual(loggerLevel) ? FilterReply.ACCEPT : FilterReply.DENY; }