本文整理了Java中ch.qos.logback.core.FileAppender.addError()
方法的一些代码示例,展示了FileAppender.addError()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileAppender.addError()
方法的具体详情如下:
包路径:ch.qos.logback.core.FileAppender
类名称:FileAppender
方法名:addError
暂无
代码示例来源:origin: camunda/camunda-bpm-platform
boolean result = FileUtil.createMissingParentDirectories(file);
if (!result) {
addError("Failed to create parent directories for ["
+ file.getAbsolutePath() + "]");
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* If the value of <b>File</b> is not <code>null</code>, then
* {@link #openFile} is called with the values of <b>File</b> and
* <b>Append</b> properties.
*/
public void start() {
int errors = 0;
if (getFile() != null) {
addInfo("File property is set to [" + fileName + "]");
if (prudent) {
if (!isAppend()) {
setAppend(true);
addWarn("Setting \"Append\" property to true on account of \"Prudent\" mode");
}
}
try {
openFile(getFile());
} catch (java.io.IOException e) {
errors++;
addError("openFile(" + fileName + "," + append + ") call failed.", e);
}
} else {
errors++;
addError("\"File\" property not set for appender named [" + name + "].");
}
if (errors == 0) {
super.start();
}
}
代码示例来源:origin: tony19/logback-android
protected void addErrorForCollision(String optionName, String optionValue, String appenderName) {
addError("'"+optionName+"' option has the same value \""+optionValue+"\" as that given for appender [" + appenderName+"] defined earlier.");
}
代码示例来源:origin: Nextdoor/bender
protected void addErrorForCollision(String optionName, String optionValue, String appenderName) {
addError("'" + optionName + "' option has the same value \"" + optionValue + "\" as that given for appender [" + appenderName + "] defined earlier.");
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
protected void addErrorForCollision(String optionName, String optionValue, String appenderName) {
addError("'" + optionName + "' option has the same value \"" + optionValue + "\" as that given for appender [" + appenderName + "] defined earlier.");
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
protected void addErrorForCollision(String optionName, String optionValue, String appenderName) {
addError("'" + optionName + "' option has the same value \"" + optionValue + "\" as that given for appender [" + appenderName + "] defined earlier.");
}
代码示例来源:origin: tony19/logback-android
@Override
protected void subAppend(E event) {
if (!initialized && lazyInit) {
initialized = true;
if (checkForFileCollisionInPreviousFileAppenders()) {
addError("Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting.");
addError(COLLISION_WITH_EARLIER_APPENDER_URL);
} else {
try {
openFile(getFile());
super.start();
} catch (IOException e) {
this.started = false;
addError("openFile(" + fileName + "," + append + ") failed", e);
}
}
}
super.subAppend(event);
}
代码示例来源:origin: com.hynnet/logback-core
boolean result = FileUtil.createMissingParentDirectories(file);
if (!result) {
addError("Failed to create parent directories for ["
+ file.getAbsolutePath() + "]");
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
boolean result = FileUtil.createMissingParentDirectories(file);
if (!result) {
addError("Failed to create parent directories for [" + file.getAbsolutePath() + "]");
代码示例来源:origin: Nextdoor/bender
boolean result = FileUtil.createMissingParentDirectories(file);
if (!result) {
addError("Failed to create parent directories for [" + file.getAbsolutePath() + "]");
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
addError("Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting.");
addError(MORE_INFO_PREFIX + COLLISION_WITH_EARLIER_APPENDER_URL);
errors++;
} else {
} catch (java.io.IOException e) {
errors++;
addError("openFile(" + fileName + "," + append + ") call failed.", e);
addError("\"File\" property not set for appender named [" + name + "].");
代码示例来源:origin: Nextdoor/bender
addError("Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting.");
addError(MORE_INFO_PREFIX + COLLISION_WITH_EARLIER_APPENDER_URL);
errors++;
} else {
} catch (java.io.IOException e) {
errors++;
addError("openFile(" + fileName + "," + append + ") call failed.", e);
addError("\"File\" property not set for appender named [" + name + "].");
代码示例来源:origin: io.virtdata/virtdata-lib-realer
boolean result = FileUtil.createMissingParentDirectories(file);
if (!result) {
addError("Failed to create parent directories for [" + file.getAbsolutePath() + "]");
代码示例来源:origin: io.virtdata/virtdata-lib-realer
addError("Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting.");
addError(MORE_INFO_PREFIX + COLLISION_WITH_EARLIER_APPENDER_URL);
errors++;
} else {
} catch (java.io.IOException e) {
errors++;
addError("openFile(" + fileName + "," + append + ") call failed.", e);
addError("\"File\" property not set for appender named [" + name + "].");
代码示例来源:origin: tony19/logback-android
boolean result = FileUtil.createMissingParentDirectories(file);
if (!result) {
addError("Failed to create parent directories for ["
+ file.getAbsolutePath() + "]");
代码示例来源:origin: ch.qos.logback/core
boolean result = FileUtil.createMissingParentDirectories(file);
if (!result) {
addError("Failed to create parent directories for ["
+ file.getAbsolutePath() + "]");
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core
boolean result = FileUtil.createMissingParentDirectories(file);
if (!result) {
addError("Failed to create parent directories for ["
+ file.getAbsolutePath() + "]");
代码示例来源:origin: ch.qos.logback/core
/**
* If the value of <b>File</b> is not <code>null</code>, then
* {@link #openFile} is called with the values of <b>File</b> and
* <b>Append</b> properties.
*/
public void start() {
int errors = 0;
if (getFile() != null) {
addInfo("File property is set to [" + fileName + "]");
if (prudent) {
if (!isAppend()) {
setAppend(true);
addWarn("Setting \"Append\" property to true on account of \"Prudent\" mode");
}
}
try {
openFile(getFile());
} catch (java.io.IOException e) {
errors++;
addError("openFile(" + fileName + "," + append + ") call failed.", e);
}
} else {
errors++;
addError("\"File\" property not set for appender named [" + name + "].");
}
if (errors == 0) {
super.start();
}
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core
/**
* If the value of <b>File</b> is not <code>null</code>, then
* {@link #openFile} is called with the values of <b>File</b> and
* <b>Append</b> properties.
*/
public void start() {
int errors = 0;
if (getFile() != null) {
addInfo("File property is set to [" + fileName + "]");
if (prudent) {
if (!isAppend()) {
setAppend(true);
addWarn("Setting \"Append\" property to true on account of \"Prudent\" mode");
}
}
try {
openFile(getFile());
} catch (java.io.IOException e) {
errors++;
addError("openFile(" + fileName + "," + append + ") call failed.", e);
}
} else {
errors++;
addError("\"File\" property not set for appender named [" + name + "].");
}
if (errors == 0) {
super.start();
}
}
代码示例来源:origin: com.hynnet/logback-core
/**
* If the value of <b>File</b> is not <code>null</code>, then
* {@link #openFile} is called with the values of <b>File</b> and
* <b>Append</b> properties.
*/
public void start() {
int errors = 0;
if (getFile() != null) {
addInfo("File property is set to [" + fileName + "]");
if (prudent) {
if (!isAppend()) {
setAppend(true);
addWarn("Setting \"Append\" property to true on account of \"Prudent\" mode");
}
}
try {
openFile(getFile());
} catch (java.io.IOException e) {
errors++;
addError("openFile(" + fileName + "," + append + ") call failed.", e);
}
} else {
errors++;
addError("\"File\" property not set for appender named [" + name + "].");
}
if (errors == 0) {
super.start();
}
}
内容来源于网络,如有侵权,请联系作者删除!