本文整理汇总了Java中org.gradle.api.logging.Logging.QUIET属性的典型用法代码示例。如果您正苦于以下问题:Java Logging.QUIET属性的具体用法?Java Logging.QUIET怎么用?Java Logging.QUIET使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.gradle.api.logging.Logging
的用法示例。
在下文中一共展示了Logging.QUIET属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toGradleLogLevel
/**
* Maps a Logback log level and optional marker to a Gradle log level.
* Returns null if there is no equivalent Gradle log level (such as for TRACE).
*/
@Nullable
public static LogLevel toGradleLogLevel(Level level, @Nullable Marker marker) {
switch(level.toInt()) {
case Level.TRACE_INT:
return null;
case Level.DEBUG_INT:
return LogLevel.DEBUG;
case Level.INFO_INT:
if (marker == Logging.LIFECYCLE) {
return LogLevel.LIFECYCLE;
}
if (marker == Logging.QUIET) {
return LogLevel.QUIET;
}
return LogLevel.INFO;
case Level.WARN_INT:
return LogLevel.WARN;
case Level.ERROR_INT:
return LogLevel.ERROR;
default:
throw new IllegalArgumentException("Don't know how to map Logback log level '" + level + "' to a Gradle log level");
}
}
示例2: toLogLevel
private LogLevel toLogLevel(Marker marker) {
if (marker == null) {
return LogLevel.INFO;
}
if (marker == Logging.LIFECYCLE) {
return LogLevel.LIFECYCLE;
}
if (marker == Logging.QUIET) {
return LogLevel.QUIET;
}
return LogLevel.INFO;
}