org.apache.log.Logger类的使用及代码示例

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

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

Logger介绍

[英]The object interacted with by client objects to perform logging.
[中]与客户端对象交互以执行日志记录的对象。

代码示例

代码示例来源:origin: org.freemarker/freemarker

  1. @Override
  2. public void debug(String message, Throwable t) {
  3. logger.debug(message, t);
  4. }

代码示例来源:origin: org.freemarker/freemarker

  1. @Override
  2. public void warn(String message) {
  3. logger.warn(message);
  4. }

代码示例来源:origin: org.freemarker/freemarker

  1. @Override
  2. public void error(String message) {
  3. logger.error(message);
  4. }

代码示例来源:origin: org.freemarker/freemarker

  1. @Override
  2. public void info(String message) {
  3. logger.info(message);
  4. }

代码示例来源:origin: undera/jmeter-plugins

  1. @Override
  2. public void testEnded(String s) {
  3. releaseAllPoolThreads();
  4. super.testEnded(s);
  5. log.info("Done " + arrivalsCount.longValue() + " arrivals, " + completionsCount.longValue() + " completions, " + abandonsCount.longValue() + " abandonments");
  6. log.debug("Pool size: " + poolThreads.size());
  7. }

代码示例来源:origin: org.freemarker/freemarker

  1. @Override
  2. public boolean isDebugEnabled() {
  3. return logger.isDebugEnabled();
  4. }

代码示例来源:origin: org.freemarker/freemarker

  1. @Override
  2. public boolean isInfoEnabled() {
  3. return logger.isInfoEnabled();
  4. }

代码示例来源:origin: org.freemarker/freemarker

  1. @Override
  2. public boolean isWarnEnabled() {
  3. return logger.isWarnEnabled();
  4. }

代码示例来源:origin: org.freemarker/freemarker

  1. @Override
  2. public boolean isErrorEnabled() {
  3. return logger.isErrorEnabled();
  4. }

代码示例来源:origin: org.apache.avalon.logkit/avalon-logkit

  1. /**
  2. * Log a warn priority event.
  3. *
  4. * @param message the message
  5. */
  6. public final void warn( final String message )
  7. {
  8. if( isWarnEnabled() )
  9. {
  10. output( Priority.WARN, message, null );
  11. }
  12. }

代码示例来源:origin: org.apache.avalon.logkit/avalon-logkit

  1. /**
  2. * Log a info priority event.
  3. *
  4. * @param message the message
  5. */
  6. public final void info( final String message )
  7. {
  8. if( isInfoEnabled() )
  9. {
  10. output( Priority.INFO, message, null );
  11. }
  12. }

代码示例来源:origin: org.apache.avalon.logkit/avalon-logkit

  1. /**
  2. * Log a error priority event.
  3. *
  4. * @param message the message
  5. */
  6. public final void error( final String message )
  7. {
  8. if( isErrorEnabled() )
  9. {
  10. output( Priority.ERROR, message, null );
  11. }
  12. }

代码示例来源:origin: org.freemarker/freemarker

  1. @Override
  2. public void info(String message, Throwable t) {
  3. logger.info(message, t);
  4. }

代码示例来源:origin: undera/jmeter-plugins

  1. public void testEnded(String string) {
  2. log.debug("Test ended captured");
  3. if (getFilename() != null && getFilename().length() > 0) {
  4. File file = new File(getFilename());
  5. if (file.exists()) {
  6. log.info("Remove lockfile from " + getFilename());
  7. file.delete();
  8. }
  9. }
  10. }

代码示例来源:origin: commons-logging/commons-logging

  1. /**
  2. * Checks whether the <code>LogKit</code> logger will log messages of priority <code>DEBUG</code>.
  3. */
  4. public boolean isTraceEnabled() {
  5. return getLogger().isDebugEnabled();
  6. }

代码示例来源:origin: commons-logging/commons-logging

  1. /**
  2. * Checks whether the <code>LogKit</code> logger will log messages of priority <code>INFO</code>.
  3. */
  4. public boolean isInfoEnabled() {
  5. return getLogger().isInfoEnabled();
  6. }

代码示例来源:origin: commons-logging/commons-logging

  1. /**
  2. * Checks whether the <code>LogKit</code> logger will log messages of priority <code>WARN</code>.
  3. */
  4. public boolean isWarnEnabled() {
  5. return getLogger().isWarnEnabled();
  6. }
  7. }

代码示例来源:origin: commons-logging/commons-logging

  1. /**
  2. * Checks whether the <code>LogKit</code> logger will log messages of priority <code>ERROR</code>.
  3. */
  4. public boolean isErrorEnabled() {
  5. return getLogger().isErrorEnabled();
  6. }

代码示例来源:origin: org.freemarker/freemarker

  1. @Override
  2. public void debug(String message) {
  3. logger.debug(message);
  4. }

代码示例来源:origin: org.freemarker/freemarker

  1. @Override
  2. public void warn(String message, Throwable t) {
  3. logger.warn(message, t);
  4. }

相关文章