本文整理了Java中org.apache.log.Logger.error()
方法的一些代码示例,展示了Logger.error()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.error()
方法的具体详情如下:
包路径:org.apache.log.Logger
类名称:Logger
方法名:error
[英]Log a error priority event.
[中]记录错误优先级事件。
代码示例来源:origin: org.freemarker/freemarker
@Override
public void error(String message) {
logger.error(message);
}
代码示例来源:origin: org.freemarker/freemarker
@Override
public void error(String message, Throwable t) {
logger.error(message, t);
}
代码示例来源:origin: commons-logging/commons-logging
/**
* Logs a message with <code>org.apache.log.Priority.ERROR</code>.
*
* @param message to log
* @see org.apache.commons.logging.Log#error(Object)
*/
public void error(Object message) {
if (message != null) {
getLogger().error(String.valueOf(message));
}
}
代码示例来源:origin: commons-logging/commons-logging
/**
* Logs a message with <code>org.apache.log.Priority.ERROR</code>.
*
* @param message to log
* @param t log this cause
* @see org.apache.commons.logging.Log#error(Object, Throwable)
*/
public void error(Object message, Throwable t) {
if (message != null) {
getLogger().error(String.valueOf(message), t);
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Logs a message with <code>org.apache.log.Priority.ERROR</code>.
*
* @param message to log
* @param t log this cause
* @see org.apache.commons.logging.Log#error(Object, Throwable)
*/
public void error(Object message, Throwable t) {
if (message != null) {
getLogger().error(String.valueOf(message), t);
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Logs a message with <code>org.apache.log.Priority.ERROR</code>.
*
* @param message to log
* @see org.apache.commons.logging.Log#error(Object)
*/
public void error(Object message) {
if (message != null) {
getLogger().error(String.valueOf(message));
}
}
代码示例来源:origin: dubbo/jmeter-plugins-dubbo
public static <T> T formJson(String json, Class<T> classOfT) {
try {
return gson.fromJson(json, classOfT);
} catch (JsonSyntaxException e) {
logger.error("json to class[" + classOfT.getName() + "] is error!",
e);
}
return null;
}
代码示例来源:origin: apache/activemq-artemis
/**
* Logs a message with <code>org.apache.log.Priority.ERROR</code>.
*
* @param message to log
* @see org.apache.activemq.artemis.shaded.org.apache.commons.logging.Log#error(Object)
*/
public void error(Object message) {
if (message != null) {
getLogger().error(String.valueOf(message));
}
}
代码示例来源:origin: apache/activemq-artemis
/**
* Logs a message with <code>org.apache.log.Priority.ERROR</code>.
*
* @param message to log
* @param t log this cause
* @see org.apache.activemq.artemis.shaded.org.apache.commons.logging.Log#error(Object, Throwable)
*/
public void error(Object message, Throwable t) {
if (message != null) {
getLogger().error(String.valueOf(message), t);
}
}
代码示例来源:origin: undera/jmeter-plugins
public boolean isLimitReached() {
long limit;
try {
limit = Long.parseLong(getArrivalsLimit());
} catch (NumberFormatException e) {
log.error("Invalid arrivals limit, defaulting to 0");
limit = 0;
}
return !(limit <= 0 || arrivalsCount.longValue() < limit);
}
代码示例来源:origin: undera/jmeter-plugins
private String getString(ByteBuffer src) {
if (src == null) {
log.error("Null buffer!");
return "";
}
return src.toString();
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
/**
* Logs a message with <code>org.apache.log.Priority.ERROR</code>.
*
* @param message to log
* @param t log this cause
* @see org.apache.commons.logging.Log#error(Object, Throwable)
*/
public void error(Object message, Throwable t) {
if (message != null) {
getLogger().error(String.valueOf(message), t);
}
}
代码示例来源:origin: kg.apc/jmeter-plugins-emulators
private String getString(ByteBuffer src) {
if (src == null) {
log.error("Null buffer!");
return "";
}
return src.toString();
}
代码示例来源:origin: undera/jmeter-plugins
protected int getPortAsInt() {
try {
return Integer.parseInt(getPort());
} catch (NumberFormatException ex) {
log.error("Wrong port: " + getTimeout(), ex);
return 0;
}
}
代码示例来源:origin: undera/jmeter-plugins
protected int getTimeoutAsInt() {
try {
return Integer.parseInt(getTimeout());
} catch (NumberFormatException ex) {
log.error("Wrong timeout: " + getTimeout(), ex);
return 0;
}
}
代码示例来源:origin: undera/jmeter-plugins
@Override
public void testStarted() {
compileColumns();
try {
openFile();
} catch (FileNotFoundException ex) {
log.error("Cannot open file " + getFilename(), ex);
} catch (IOException ex) {
log.error("Cannot write file header " + getFilename(), ex);
}
}
代码示例来源:origin: undera/jmeter-plugins
private int getResponseLatencySecsAsInt() {
int res = 0;
try {
res = Integer.valueOf(getResponseLatencySecs());
} catch (NumberFormatException e) {
log.error("Wrong response time period: " + getResponseLatencySecs(), e);
setResponseLatencySecs("1");
}
return res > 0 ? res : 1;
}
代码示例来源:origin: undera/jmeter-plugins
private int getErrorRateSecsAsInt() {
int res = 0;
try {
res = Integer.valueOf(getErrorRateSecs());
} catch (NumberFormatException e) {
log.error("Wrong error rate period: " + getResponseTime(), e);
setErrorRateSecs("1");
}
return res > 0 ? res : 1;
}
代码示例来源:origin: undera/jmeter-plugins
private float getErrorRateAsFloat() {
float res = 0;
try {
res = Float.valueOf(getErrorRate()) / 100;
} catch (NumberFormatException e) {
log.error("Wrong error rate: " + getErrorRate(), e);
setErrorRate("0");
}
return res;
}
代码示例来源:origin: undera/jmeter-plugins
private void connect(SampleResult res) {
if (channel == null || !channel.isOpen()) {
try {
channel = (DatagramChannel) getChannel();
} catch (IOException ex) {
log.error("Cannot open channel", ex);
}
}
res.connectEnd();
}
内容来源于网络,如有侵权,请联系作者删除!