本文整理了Java中org.modeshape.common.logging.Logger.error()
方法的一些代码示例,展示了Logger.error()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.error()
方法的具体详情如下:
包路径:org.modeshape.common.logging.Logger
类名称:Logger
方法名:error
[英]Log an exception (throwable) at the ERROR level with an accompanying message. If the exception is null, then this method calls #error(org.modeshape.common.i18n.I18nResource,Object...).
[中]在错误级别记录异常(可丢弃),并附带消息。如果异常为null,则此方法调用#error(org.modeshape.common.i18n.I18nResource,Object…)。
代码示例来源:origin: org.modeshape/modeshape-common
private void closeStream() {
try {
stream.close();
} catch (IOException e) {
LOGGER.error(e, CommonI18n.errorClosingWrappedStream);
}
}
}
代码示例来源:origin: org.fcrepo/modeshape-common
private void closeStream() {
try {
stream.close();
} catch (IOException e) {
LOGGER.error(e, CommonI18n.errorClosingWrappedStream);
}
}
}
代码示例来源:origin: ModeShape/modeshape
@Override
public void handleException( ChangeSetListener consumer,
Throwable t,
ChangeSet entry,
long position,
long maxPosition ) {
LOGGER.error(t, BusI18n.errorProcessingEvent, entry.toString(), position);
}
}
代码示例来源:origin: ModeShape/modeshape
private void notifiyListeners() {
for (NodeTypes.Listener listener : this.listeners) {
assert listener != null;
try {
listener.notify(nodeTypesCache);
} catch (RuntimeException e) {
logger.error(e, JcrI18n.errorNotifyingNodeTypesListener, listener);
}
}
}
代码示例来源:origin: ModeShape/modeshape
protected final void error( I18n message,
Object... params ) {
logger.error(message, params);
problems.addError(message, params);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
protected final void error( I18n message,
Object... params ) {
logger.error(message, params);
problems.addError(message, params);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
private void notifiyListeners() {
for (NodeTypes.Listener listener : this.listeners) {
assert listener != null;
try {
listener.notify(nodeTypesCache);
} catch (RuntimeException e) {
logger.error(e, JcrI18n.errorNotifyingNodeTypesListener, listener);
}
}
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
protected final void error( Throwable t,
I18n message,
Object... params ) {
logger.error(t, message, params);
problems.addError(t, message, params);
}
代码示例来源:origin: ModeShape/modeshape
@Override
public void error( String message,
Object... params ) {
if (logger.isErrorEnabled()) {
logger.error(new TextI18n(message), params);
}
}
代码示例来源:origin: ModeShape/modeshape
@Override
public void error( Throwable t,
String message,
Object... params ) {
if (logger.isErrorEnabled()) {
logger.error(t, new TextI18n(message), params);
}
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
@Override
public void error( Throwable t,
String message,
Object... params ) {
if (logger.isErrorEnabled()) {
logger.error(t, new TextI18n(message), params);
}
}
代码示例来源:origin: ModeShape/modeshape
@Override
public void error( String message,
Object... params ) {
if (logger.isErrorEnabled()) {
logger.error(new TextI18n(message), params);
}
}
代码示例来源:origin: org.modeshape/modeshape-web-jcr
@Override
public void error( Throwable t,
String message,
Object... params ) {
if (logger.isErrorEnabled()) {
logger.error(t, new TextI18n(message), params);
}
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
@Override
public void error( String message,
Object... params ) {
if (logger.isErrorEnabled()) {
logger.error(new TextI18n(message), params);
}
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
void shutdown() {
for (IndexProvider provider : providers.values()) {
try {
provider.shutdown();
} catch (RepositoryException e) {
logger.error(e, JcrI18n.errorShuttingDownIndexProvider, repository.name(), provider.getName(), e.getMessage());
}
}
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
private void cleanLocks() {
try {
lockManager().cleanLocks();
} catch (RepositoryException e) {
// This can only happen if the session is not live, which is checked above ...
Logger.getLogger(getClass()).error(e, JcrI18n.unexpectedException, e.getMessage());
}
}
代码示例来源:origin: ModeShape/modeshape
private void cleanLocks() {
try {
lockManager().cleanLocks();
} catch (RepositoryException e) {
// This can only happen if the session is not live, which is checked above ...
Logger.getLogger(getClass()).error(e, JcrI18n.unexpectedException, e.getMessage());
}
}
代码示例来源:origin: ModeShape/modeshape
public static void killRepository( JcrRepository repository ) {
if (repository == null || repository.getState() != State.RUNNING) return;
try {
// Rollback any open transactions ...
killTransaction(repository.runningState().txnManager());
// First shut down the repository ...
repository.doShutdown(false);
} catch (Throwable t) {
log.error(t, JcrI18n.errorKillingRepository, repository.getName(), t.getMessage());
}
}
代码示例来源:origin: ModeShape/modeshape
@Test
public void shouldLogAppropriateMessagesIfLog4jSetToErrorLevel() {
log4jLogger.setLevel(Level.ERROR);
logger.error(errorMessageWithNoParameters);
logger.warn(warningMessageWithNoParameters);
logger.info(infoMessageWithNoParameters);
logger.debug("This is a debug message with no parameters");
logger.trace("This is a trace message with no parameters");
log.removeFirst(Logger.Level.ERROR, "This is an error message with no parameters");
assertEquals(false, log.hasEvents());
}
代码示例来源:origin: ModeShape/modeshape
@Test
public void shouldLogAppropriateMessagesIfLog4jSetToWarningLevel() {
log4jLogger.setLevel(Level.WARN);
logger.error(errorMessageWithNoParameters);
logger.warn(warningMessageWithNoParameters);
logger.info(infoMessageWithNoParameters);
logger.debug("This is a debug message with no parameters");
logger.trace("This is a trace message with no parameters");
log.removeFirst(Logger.Level.ERROR, "This is an error message with no parameters");
log.removeFirst(Logger.Level.WARNING, "This is a warning message with no parameters");
assertEquals(false, log.hasEvents());
}
内容来源于网络,如有侵权,请联系作者删除!