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

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

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

Logger介绍

[英]This class allows isolation of all logging dependencies in one place. There is 0 dependencies on third party logs

By default logging uses uses JDK logging. The logging configuration file (logging.properties). You can use standard JDK logging config.
I wrote similar facilities in Crank and EasyJava, but this style was heavily inspired by Vertx which was inspired by JBoss.
[中]此类允许在一个位置隔离所有日志依赖项。对第三方日志有0个依赖项
默认情况下,日志记录使用JDK日志记录。日志配置文件(logging.properties)。您可以使用标准的JDK日志配置。
我用Crank和EasyJava编写了类似的工具,但这种风格的灵感来源于JBoss的Vertx。

代码示例

代码示例来源:origin: boonproject/boon

@Override
  public void log(String message) {
    logger.info("FROM DATABASE LOG", message);
  }
});

代码示例来源:origin: boonproject/boon

@Override
  public void run() {
    try {
      manageTimer();
    } catch (Exception ex) {
      logger.error(ex, "can't manage timeHolder");
    }
  }
}, 50, 50, TimeUnit.MILLISECONDS);

代码示例来源:origin: boonproject/boon

@Override
public boolean has(Class type) {
  if (debug) logger.debug(contextImpl, "has( type )", "IN", type);
  if (debug) logger.debug(contextImpl, "has( type )", "IN", type);
  for (Module module : modules) {
    if (module.has(type)) {
      if (debug) logger.debug(contextImpl, "has( type )", "IN", type, "OUT", true);
      return true;
    }
  }
  if (debug) logger.debug(contextImpl, "has( type )", "IN", type, "OUT", false);
  return false;
}

代码示例来源:origin: RichardHightower/slumberdb

private void doHandleCallFromClient(final Map<String, String> message, String uri, final Object commChannel) {
  try {
    if (debug) logger.info("RequestHandler::doHandleCallFromClient", message);
    final DataStoreRequest dataStoreRequest = createRequest(message);
    if (debug) logger.info("RequestHandler::doHandleCallFromClient", dataStoreRequest);
    storeServer.registerOutputHandler(dataStoreRequest.clientId(), commChannel);
    mainRequestHandler(dataStoreRequest);
  } catch (Exception ex) {
    logger.error(ex, "RequestHandler::Unable to handle request");
    logger.error("RequestHandler::Unable to handle request MAP DATA", message);
  }
}

代码示例来源:origin: boonproject/boon

public void handleSQLException(SQLException ex) {
  SQLException next = ex.getNextException();
  while (next != null) {
    logger.warn(next, "BasyMySQLSupport Nested SQL Exception", next.getMessage());
    next = ex.getNextException();
  }
}

代码示例来源:origin: boonproject/boon

outputMap.clear();
} catch (Exception ex) {
  logger.error(ex, "MySQL Store, Unable to add an item to the store queue, this means we can't write to MySQL buf size",
      outputMap.size(), "queue size", writeQueue.size());
  logger.fatal(ex, "MySQL Store, Unable to add an item to the store queue, this means we can't write to MySQL",
      outputMap.size(), "queue size", writeQueue.size());

代码示例来源:origin: boonproject/boon

@Override
  public void run() {
    if (stop.get()) {
      return;
    }
    try {
      processReadQueue();
    } catch (InterruptedException ex) {
      //let it restart or stop
    } catch (Exception ex) {
      logger.fatal(ex, "Problem with base data store running scheduled job");
    }
  }
}, 0, dataStoreConfig.threadErrorResumeTimeMS(), TimeUnit.MILLISECONDS);

代码示例来源:origin: boonproject/boon

/**
 * Returns a logger.
 * Facade into config system.
 *
 * @param name name of logger based.
 * @return logger.
 */
public static Logger logger(String name) {
  return new Logger(Logging.logger(name));
}

代码示例来源:origin: boonproject/boon

/**
 * Handles an Exception.
 * @param ex
 */
public void handleSQLException(SQLException ex) {
  SQLException next = ex.getNextException();
  while (next != null) {
    logger.warn(next, "BasyMySQLSupport Nested SQL Exception", next.getMessage());
    next = ex.getNextException();
  }
}

代码示例来源:origin: boonproject/boon

@Override
  public void run() {
    if (stop.get()) {
      return;
    }
    try {
      processWriteQueue();
    } catch (InterruptedException ex) {
      //let it restart or stop
    } catch (Exception ex) {
      logger.fatal(ex);
    }
  }
}, 0, dataStoreConfig.threadErrorResumeTimeMS(), TimeUnit.MILLISECONDS);

代码示例来源:origin: boonproject/boon

/**
 * Returns a configurable logger.
 * Facade into config system.
 *
 * @param name name of logger based.
 * @return logger.
 */
public static Logger configurableLogger(String name) {
  return new Logger(Logging.configurableLogger(name));
}

代码示例来源:origin: boonproject/boon

@Override
  public void log(String message) {
    logger.info("FROM DATABASE LOG", message);
  }
});

代码示例来源:origin: boonproject/boon

@Override
  public void run() {
    try {
      manageTimer();
    } catch (Exception ex) {
      logger.error(ex, "can't manage timeHolder");
    }
  }
}, 50, 50, TimeUnit.MILLISECONDS);

代码示例来源:origin: boonproject/boon

@Override
public boolean has(Class type) {
  if (debug) logger.debug(contextImpl, "has( type )", "IN", type);
  if (debug) logger.debug(contextImpl, "has( type )", "IN", type);
  for (Module module : modules) {
    if (module.has(type)) {
      if (debug) logger.debug(contextImpl, "has( type )", "IN", type, "OUT", true);
      return true;
    }
  }
  if (debug) logger.debug(contextImpl, "has( type )", "IN", type, "OUT", false);
  return false;
}

代码示例来源:origin: boonproject/boon

public void handleSQLException(SQLException ex) {
  SQLException next = ex.getNextException();
  while (next != null) {
    logger.warn(next, "BasyMySQLSupport Nested SQL Exception", next.getMessage());
    next = ex.getNextException();
  }
}

代码示例来源:origin: boonproject/boon

/**
 * Like puts but for fatal logging.
 *
 * @param messages messages to write.
 */
public static void fatal(Object... messages) {
  _log().fatal(messages);
}

代码示例来源:origin: boonproject/boon

/**
 * Returns a configurable logger.
 * Facade into config system.
 *
 * @param clazz name of logger based on classname.
 * @return logger.
 */
public static Logger configurableLogger(final Class<?> clazz) {
  return new Logger(Logging.configurableLogger(clazz.getName()));
}

代码示例来源:origin: io.fastjson/slumberdb-leveldb

@Override
  public void log(String message) {
    logger.info("FROM DATABASE LOG", message);
  }
});

代码示例来源:origin: boonproject/boon

@Override
  public void run() {
    try {
      processSets();
    }
    catch (Exception ex) {
      logger.error(ex, "ReplicationDataStore failed");
    }
  }
});

代码示例来源:origin: boonproject/boon

@Override
public void parent(Context context) {
  if (debug) logger.debug(contextImpl, "parent");
  this.parent.set(context);
}

相关文章