org.gradle.api.logging.Logger.isErrorEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(221)

本文整理了Java中org.gradle.api.logging.Logger.isErrorEnabled()方法的一些代码示例,展示了Logger.isErrorEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isErrorEnabled()方法的具体详情如下:
包路径:org.gradle.api.logging.Logger
类名称:Logger
方法名:isErrorEnabled

Logger.isErrorEnabled介绍

暂无

代码示例

代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-tlddoc-builder

  1. if (logger.isErrorEnabled()) {
  2. String fileName = file.getName();

代码示例来源:origin: com.liferay/com.liferay.gradle.plugins.node

  1. @Override
  2. public String call() throws Exception {
  3. String logLevel = null;
  4. Logger logger = getLogger();
  5. if (logger.isTraceEnabled()) {
  6. logLevel = "silly";
  7. }
  8. else if (logger.isDebugEnabled()) {
  9. logLevel = "verbose";
  10. }
  11. else if (logger.isInfoEnabled()) {
  12. logLevel = "info";
  13. }
  14. else if (logger.isWarnEnabled()) {
  15. logLevel = "warn";
  16. }
  17. else if (logger.isErrorEnabled()) {
  18. logLevel = "error";
  19. }
  20. return logLevel;
  21. }

代码示例来源:origin: gradle.plugin.com.liferay/gradle-plugins-node

  1. @Override
  2. public String call() throws Exception {
  3. String logLevel = null;
  4. Logger logger = getLogger();
  5. if (logger.isTraceEnabled()) {
  6. logLevel = "silly";
  7. }
  8. else if (logger.isDebugEnabled()) {
  9. logLevel = "verbose";
  10. }
  11. else if (logger.isInfoEnabled()) {
  12. logLevel = "info";
  13. }
  14. else if (logger.isWarnEnabled()) {
  15. logLevel = "warn";
  16. }
  17. else if (logger.isErrorEnabled()) {
  18. logLevel = "error";
  19. }
  20. return logLevel;
  21. }

代码示例来源:origin: gradle.plugin.com.google.cloud.tools/jib-gradle-plugin

  1. consoleLoggerBuilder.warn(logger::warn);
  2. if (logger.isErrorEnabled()) {
  3. consoleLoggerBuilder.error(logger::error);

相关文章