org.osgl.logging.Logger.isDebugEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(383)

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

Logger.isDebugEnabled介绍

暂无

代码示例

代码示例来源:origin: actframework/actframework

  1. protected boolean isDebugEnabled() {
  2. return logger.isDebugEnabled();
  3. }

代码示例来源:origin: org.actframework/act

  1. protected boolean isDebugEnabled() {
  2. return logger.isDebugEnabled();
  3. }

代码示例来源:origin: org.actframework/act-morphia

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

代码示例来源:origin: actframework/actframework

  1. private void compileSources() {
  2. long l = 0;
  3. if (logger.isDebugEnabled()) {
  4. logger.debug("Source compiling starts ...");
  5. l = $.ms();
  6. }
  7. Collection<Source> toBeCompiled = sources.values();
  8. compiler.compile(toBeCompiled);
  9. if (logger.isDebugEnabled()) {
  10. logger.debug("Source compiling takes %sms to compile %s sources", $.ms() - l, toBeCompiled.size());
  11. }
  12. }

代码示例来源:origin: org.actframework/act

  1. private void compileSources() {
  2. long l = 0;
  3. if (logger.isDebugEnabled()) {
  4. logger.debug("Source compiling starts ...");
  5. l = $.ms();
  6. }
  7. Collection<Source> toBeCompiled = sources.values();
  8. compiler.compile(toBeCompiled);
  9. if (logger.isDebugEnabled()) {
  10. logger.debug("Source compiling takes %sms to compile %s sources", $.ms() - l, toBeCompiled.size());
  11. }
  12. }

代码示例来源:origin: org.actframework/act-morphia

  1. @Override
  2. protected void releaseResources() {
  3. ClientManager.release(this);
  4. if (null != fieldNameLookup) {
  5. fieldNameLookup.clear();
  6. fieldNameLookup = null;
  7. }
  8. morphia = null;
  9. if (logger.isDebugEnabled()) {
  10. logger.debug("Morphia shutdown: %s", id());
  11. }
  12. }

代码示例来源:origin: org.actframework/act-ebean2

  1. @Override
  2. protected void releaseResources() {
  3. if (null != ebean) {
  4. ebean.shutdown(true, false);
  5. if (_logger.isDebugEnabled()) {
  6. _logger.debug("ebean shutdown: %s", id());
  7. }
  8. ebean = null;
  9. ebeanConfig = null;
  10. }
  11. super.releaseResources();
  12. }

代码示例来源:origin: org.actframework/act-ebean-java7

  1. @Override
  2. protected void releaseResources() {
  3. if (null != ebean) {
  4. ebean.shutdown(true, false);
  5. if (logger.isDebugEnabled()) {
  6. logger.debug("ebean shutdown: %s", id());
  7. }
  8. ebean = null;
  9. }
  10. if (null != ebeanReadOnly) {
  11. ebeanReadOnly.shutdown(true, false);
  12. if (logger.isDebugEnabled()) {
  13. logger.debug("ebean readonly shutdown: %s", id());
  14. }
  15. ebeanReadOnly = null;
  16. }
  17. super.releaseResources();
  18. }

代码示例来源:origin: org.actframework/act-ebean

  1. @Override
  2. protected void releaseResources() {
  3. if (null != ebean) {
  4. ebean.shutdown(true, false);
  5. if (logger.isDebugEnabled()) {
  6. logger.debug("ebean shutdown: %s", id());
  7. }
  8. ebean = null;
  9. }
  10. if (null != ebeanReadOnly) {
  11. ebeanReadOnly.shutdown(true, false);
  12. if (logger.isDebugEnabled()) {
  13. logger.debug("ebean readonly shutdown: %s", id());
  14. }
  15. ebeanReadOnly = null;
  16. }
  17. super.releaseResources();
  18. }

代码示例来源:origin: org.actframework/act-ebean2

  1. if (LOGGER.isDebugEnabled()) {
  2. LOGGER.debug(S.concat("agent already loaded: ", agentName));

代码示例来源:origin: org.actframework/act-ebean

  1. if (LOGGER.isDebugEnabled()) {
  2. LOGGER.debug(S.concat("agent already loaded: ", agentName));

代码示例来源:origin: org.actframework/act-ebean-java7

  1. if (LOGGER.isDebugEnabled()) {
  2. LOGGER.debug(S.concat("agent already loaded: ", agentName));

代码示例来源:origin: org.actframework/act

  1. long ns = timer.ns();
  2. timer.stop();
  3. if (logger.isDebugEnabled()) {
  4. logger.debug("it takes %sms to find %s sources to be scanned and their bytecodes", ns / (1000 * 1000), sources.size());

代码示例来源:origin: actframework/actframework

  1. long ns = timer.ns();
  2. timer.stop();
  3. if (logger.isDebugEnabled()) {
  4. logger.debug("it takes %sms to scan %s sources and their bytecodes", ns / (1000 * 1000), sources.size());

代码示例来源:origin: actframework/actframework

  1. public boolean send() {
  2. try {
  3. MimeMessage message = createMessage();
  4. if (!mailerConfig().mock()) {
  5. if (logger.isDebugEnabled()) {
  6. logger.debug("Sending email\n%sEnd email\n", debug(message));
  7. }
  8. Transport.send(message);
  9. } else {
  10. logger.info("Sending email\n%sEnd email\n", debug(message));
  11. }
  12. return true;
  13. } catch (Exception e) {
  14. logger.error(e, "Error sending email: %s", this);
  15. return false;
  16. }
  17. }

代码示例来源:origin: org.actframework/act

  1. long ns = timer.ns();
  2. timer.stop();
  3. if (logger.isDebugEnabled()) {
  4. logger.debug("it takes %sms to scan %s sources and their bytecodes", ns / (1000 * 1000), sources.size());

代码示例来源:origin: org.actframework/act

  1. public boolean send() {
  2. try {
  3. MimeMessage message = createMessage();
  4. if (!mailerConfig().mock()) {
  5. if (logger.isDebugEnabled()) {
  6. logger.debug("Sending email\n%sEnd email\n", debug(message));
  7. }
  8. Transport.send(message);
  9. } else {
  10. logger.info("Sending email\n%sEnd email\n", debug(message));
  11. }
  12. return true;
  13. } catch (Exception e) {
  14. logger.error(e, "Error sending email: %s", this);
  15. return false;
  16. }
  17. }

代码示例来源:origin: actframework/actframework

  1. if (logger.isDebugEnabled()) {
  2. ms = $.ms();
  3. logger.debug("Bytecode scanning starts on %s classes ...", classes.size());
  4. if (logger.isDebugEnabled()) {
  5. logger.debug("Bytecode scanning takes: " + ($.ms() - ms) + "ms");

代码示例来源:origin: org.actframework/act

  1. @Command(name = "act.log.level.show", help = "Show log level")
  2. public String showLogLevel(@Required("specify LOGGER name") String name) {
  3. Logger logger = LogManager.get(name);
  4. if (logger.isTraceEnabled()) {
  5. return "trace";
  6. } else if (logger.isDebugEnabled()) {
  7. return "debug";
  8. } else if (logger.isInfoEnabled()) {
  9. return "info";
  10. } else if (logger.isWarnEnabled()) {
  11. return "warn";
  12. } else if (logger.isErrorEnabled()) {
  13. return "error";
  14. }
  15. return "fatal";
  16. }

代码示例来源:origin: actframework/actframework

  1. @Command(name = "act.log.level.show", help = "Show log level")
  2. public String showLogLevel(@Required("specify LOGGER name") String name) {
  3. Logger logger = LogManager.get(name);
  4. if (logger.isTraceEnabled()) {
  5. return "trace";
  6. } else if (logger.isDebugEnabled()) {
  7. return "debug";
  8. } else if (logger.isInfoEnabled()) {
  9. return "info";
  10. } else if (logger.isWarnEnabled()) {
  11. return "warn";
  12. } else if (logger.isErrorEnabled()) {
  13. return "error";
  14. }
  15. return "fatal";
  16. }

相关文章