本文整理了Java中org.sonar.api.utils.log.Logger.isTraceEnabled()
方法的一些代码示例,展示了Logger.isTraceEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isTraceEnabled()
方法的具体详情如下:
包路径:org.sonar.api.utils.log.Logger
类名称:Logger
方法名:isTraceEnabled
暂无
代码示例来源:origin: SonarSource/sonarqube
@Override
public boolean isTraceEnabled() {
return logger.isTraceEnabled();
}
代码示例来源:origin: SonarSource/sonarqube
public static Profiler createIfTrace(Logger logger) {
if (logger.isTraceEnabled()) {
return create(logger);
}
return NullProfiler.NULL_INSTANCE;
}
代码示例来源:origin: SonarSource/sonarqube
public static Profiler createIfTrace(Logger logger) {
if (logger.isTraceEnabled()) {
return create(logger);
}
return NullProfiler.NULL_INSTANCE;
}
代码示例来源:origin: SonarSource/sonarqube
private static boolean shouldLog(Logger logger, LoggerLevel level) {
if (level == LoggerLevel.TRACE && !logger.isTraceEnabled()) {
return false;
}
return level != LoggerLevel.DEBUG || logger.isDebugEnabled();
}
代码示例来源:origin: SonarSource/sonarqube
/**
* Logs a TRACE message, which is only to be constructed if the logging level
* is such that the message will actually be logged.
* <p>
* TRACE messages must
* be valuable for diagnosing production problems. They must not be used for development debugging.
* They can significantly slow down performances. The standard use-case is logging of
* SQL and Elasticsearch requests.
* @param msgSupplier A function, which when called, produces the desired log message
* @since 6.3
*/
default void trace(Supplier<String> msgSupplier) {
if (isTraceEnabled()) {
trace(msgSupplier.get());
}
}
代码示例来源:origin: org.sonarsource.sonarqube/sonar-core
@Override
public boolean isTraceEnabled() {
return logger.isTraceEnabled();
}
代码示例来源:origin: org.codehaus.sonar/sonar-plugin-api
public static Profiler createIfTrace(Logger logger) {
if (logger.isTraceEnabled()) {
return create(logger);
}
return NullProfiler.NULL_INSTANCE;
}
代码示例来源:origin: org.sonarsource.sonarqube/sonar-core
public static Profiler createIfTrace(Logger logger) {
if (logger.isTraceEnabled()) {
return create(logger);
}
return NullProfiler.NULL_INSTANCE;
}
代码示例来源:origin: org.sonarsource.sonarqube/sonar-core
private static boolean shouldLog(Logger logger, LoggerLevel level) {
if (level == LoggerLevel.TRACE && !logger.isTraceEnabled()) {
return false;
}
return level != LoggerLevel.DEBUG || logger.isDebugEnabled();
}
代码示例来源:origin: org.sonarsource.sonarqube/sonar-plugin-api
public static Profiler createIfTrace(Logger logger) {
if (logger.isTraceEnabled()) {
return create(logger);
}
return NullProfiler.NULL_INSTANCE;
}
代码示例来源:origin: org.sonarsource.sonarqube/sonar-plugin-api
/**
* Logs a TRACE message, which is only to be constructed if the logging level
* is such that the message will actually be logged.
* <p>
* TRACE messages must
* be valuable for diagnosing production problems. They must not be used for development debugging.
* They can significantly slow down performances. The standard use-case is logging of
* SQL and Elasticsearch requests.
* @param msgSupplier A function, which when called, produces the desired log message
* @since 6.3
*/
default void trace(Supplier<String> msgSupplier) {
if (isTraceEnabled()) {
trace(msgSupplier.get());
}
}
内容来源于网络,如有侵权,请联系作者删除!