本文整理了Java中org.jboss.logmanager.Logger.log()
方法的一些代码示例,展示了Logger.log()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.log()
方法的具体详情如下:
包路径:org.jboss.logmanager.Logger
类名称:Logger
方法名:log
[英]SPI interface method to log a message at a given level, with a specific resource bundle.
[中]SPI接口方法,使用特定的资源包在给定级别记录消息。
代码示例来源:origin: wildfly/wildfly
protected void doLog(final Level level, final String loggerClassName, final Object message, final Object[] parameters, final Throwable thrown) {
java.util.logging.Level translatedLevel = translate(level);
if (logger.isLoggable(translatedLevel)) {
if (parameters == null) {
logger.log(loggerClassName, translatedLevel, String.valueOf(message), thrown);
} else {
logger.log(loggerClassName, translatedLevel, String.valueOf(message), ExtLogRecord.FormatStyle.MESSAGE_FORMAT, parameters, thrown);
}
}
}
代码示例来源:origin: wildfly/wildfly
protected void doLogf(final Level level, final String loggerClassName, final String format, final Object[] parameters, final Throwable thrown) {
if (parameters == null) {
logger.log(loggerClassName, translate(level), format, thrown);
} else {
logger.log(loggerClassName, translate(level), format, ExtLogRecord.FormatStyle.PRINTF, parameters, thrown);
}
}
代码示例来源:origin: org.jboss.logmanager/jboss-logmanager
/**
* SPI interface method to log a message at a given level.
*
* @param fqcn the fully qualified class name of the first logger class
* @param level the level to log at
* @param message the message
* @param t the throwable, if any
*/
public void log(final String fqcn, final Level level, final String message, final Throwable t) {
log(fqcn, level, message, ExtLogRecord.FormatStyle.MESSAGE_FORMAT, null, t);
}
代码示例来源:origin: org.jboss.logmanager/jboss-logmanager
/**
* Method invoked when the given thread terminates due to the given uncaught exception. <p>Any exception thrown by this
* method will be ignored by the Java Virtual Machine.
*
* @param t the thread
* @param e the exception
*/
public void uncaughtException(final Thread t, final Throwable e) {
log.log(Level.ERROR, "Uncaught exception", e);
}
}
代码示例来源:origin: org.jboss.logging/jboss-logging-logmanager
public void logf(final org.jboss.logging.Logger.Level level, final String loggerFqcn, final String format, final Object[] params, final Throwable t) {
if (params == null) {
logger.log(loggerFqcn, LEVELS.get(level), format, t);
} else {
logger.log(loggerFqcn, LEVELS.get(level), format, ExtLogRecord.FormatStyle.PRINTF, params, t);
}
}
}
代码示例来源:origin: org.jboss.logging/jboss-logging-logmanager
public void log(final org.jboss.logging.Logger.Level level, final String loggerFqcn, final Object message, final Object[] params, final Throwable t) {
if (params == null) {
logger.log(loggerFqcn, LEVELS.get(level), String.valueOf(message), t);
} else {
logger.log(loggerFqcn, LEVELS.get(level), String.valueOf(message), ExtLogRecord.FormatStyle.MESSAGE_FORMAT, params, t);
}
}
代码示例来源:origin: org.jboss.logmanager/jboss-logmanager
private static void safeFlush(Handler handler) {
try {
if (handler != null) handler.flush();
} catch (Throwable t) {
// todo - might this loop somehow?
log.log(Level.ERROR, "Error flushing a log handler", t);
}
}
代码示例来源:origin: weld/core
protected void doLog(final Level level, final String loggerClassName, final Object message, final Object[] parameters, final Throwable thrown) {
java.util.logging.Level translatedLevel = translate(level);
if (logger.isLoggable(translatedLevel)) {
if (parameters == null) {
logger.log(loggerClassName, translatedLevel, String.valueOf(message), thrown);
} else {
logger.log(loggerClassName, translatedLevel, String.valueOf(message), ExtLogRecord.FormatStyle.MESSAGE_FORMAT, parameters, thrown);
}
}
}
代码示例来源:origin: weld/core
protected void doLogf(final Level level, final String loggerClassName, final String format, final Object[] parameters, final Throwable thrown) {
if (parameters == null) {
logger.log(loggerClassName, translate(level), format, thrown);
} else {
logger.log(loggerClassName, translate(level), format, ExtLogRecord.FormatStyle.PRINTF, parameters, thrown);
}
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
protected void doLog(final Level level, final String loggerClassName, final Object message, final Object[] parameters, final Throwable thrown) {
java.util.logging.Level translatedLevel = translate(level);
if (logger.isLoggable(translatedLevel)) {
if (parameters == null) {
logger.log(loggerClassName, translatedLevel, String.valueOf(message), thrown);
} else {
logger.log(loggerClassName, translatedLevel, String.valueOf(message), ExtLogRecord.FormatStyle.MESSAGE_FORMAT, parameters, thrown);
}
}
}
代码示例来源:origin: org.jboss.seam.solder/seam-solder
protected void doLogf(final Level level, final String loggerClassName, final String format, final Object[] parameters, final Throwable thrown) {
if (parameters == null) {
logger.log(loggerClassName, translate(level), format, thrown);
} else {
logger.log(loggerClassName, translate(level), format, ExtLogRecord.FormatStyle.PRINTF, parameters, thrown);
}
}
代码示例来源:origin: org.jboss.logging/com.springsource.org.jboss.logging
protected void doLog(final Level level, final String loggerClassName, final Object message, final Object[] parameters, final Throwable thrown) {
if (parameters == null) {
logger.log(loggerClassName, translate(level), String.valueOf(message), thrown);
} else {
logger.log(loggerClassName, translate(level), String.valueOf(message), ExtLogRecord.FormatStyle.MESSAGE_FORMAT, parameters, thrown);
}
}
代码示例来源:origin: org.jboss.weld.se/weld-se-shaded
protected void doLogf(final Level level, final String loggerClassName, final String format, final Object[] parameters, final Throwable thrown) {
if (parameters == null) {
logger.log(loggerClassName, translate(level), format, thrown);
} else {
logger.log(loggerClassName, translate(level), format, ExtLogRecord.FormatStyle.PRINTF, parameters, thrown);
}
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
protected void doLogf(final Level level, final String loggerClassName, final String format, final Object[] parameters, final Throwable thrown) {
if (parameters == null) {
logger.log(loggerClassName, translate(level), format, thrown);
} else {
logger.log(loggerClassName, translate(level), format, ExtLogRecord.FormatStyle.PRINTF, parameters, thrown);
}
}
代码示例来源:origin: org.jboss.weld.servlet/weld-servlet-shaded
protected void doLog(final Level level, final String loggerClassName, final Object message, final Object[] parameters, final Throwable thrown) {
java.util.logging.Level translatedLevel = translate(level);
if (logger.isLoggable(translatedLevel)) {
if (parameters == null) {
logger.log(loggerClassName, translatedLevel, String.valueOf(message), thrown);
} else {
logger.log(loggerClassName, translatedLevel, String.valueOf(message), ExtLogRecord.FormatStyle.MESSAGE_FORMAT, parameters, thrown);
}
}
}
代码示例来源:origin: org.jboss.logmanager/jboss-logmanager
private static void safeClose(Handler handler) {
try {
if (handler != null) handler.close();
} catch (Throwable t) {
// todo - might this loop somehow?
log.log(Level.ERROR, "Error closing a log handler", t);
}
}
代码示例来源:origin: org.jboss.weld.se/weld-se
protected void doLog(final Level level, final String loggerClassName, final Object message, final Object[] parameters, final Throwable thrown) {
java.util.logging.Level translatedLevel = translate(level);
if (logger.isLoggable(translatedLevel)) {
if (parameters == null) {
logger.log(loggerClassName, translatedLevel, String.valueOf(message), thrown);
} else {
logger.log(loggerClassName, translatedLevel, String.valueOf(message), ExtLogRecord.FormatStyle.MESSAGE_FORMAT, parameters, thrown);
}
}
}
代码示例来源:origin: org.jboss.weld.se/weld-se
protected void doLogf(final Level level, final String loggerClassName, final String format, final Object[] parameters, final Throwable thrown) {
if (parameters == null) {
logger.log(loggerClassName, translate(level), format, thrown);
} else {
logger.log(loggerClassName, translate(level), format, ExtLogRecord.FormatStyle.PRINTF, parameters, thrown);
}
}
代码示例来源:origin: org.jboss.weld.se/weld-se-shaded
protected void doLog(final Level level, final String loggerClassName, final Object message, final Object[] parameters, final Throwable thrown) {
java.util.logging.Level translatedLevel = translate(level);
if (logger.isLoggable(translatedLevel)) {
if (parameters == null) {
logger.log(loggerClassName, translatedLevel, String.valueOf(message), thrown);
} else {
logger.log(loggerClassName, translatedLevel, String.valueOf(message), ExtLogRecord.FormatStyle.MESSAGE_FORMAT, parameters, thrown);
}
}
}
代码示例来源:origin: org.jboss.logmanager/commons-logging-jboss-logmanager
private void log(final Level level, final Object message, final Throwable t) {
final String msg = String.valueOf(message);
final ExtLogRecord record = new ExtLogRecord(level, msg, LOGGER_CLASS_NAME);
record.setThrown(t);
delegate.log(record);
}
内容来源于网络,如有侵权,请联系作者删除!