本文整理了Java中org.modeshape.common.logging.Logger.info()
方法的一些代码示例,展示了Logger.info()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.info()
方法的具体详情如下:
包路径:org.modeshape.common.logging.Logger
类名称:Logger
方法名:info
[英]Log an exception (throwable) at the INFO level with an accompanying message. If the exception is null, then this method calls #info(org.modeshape.common.i18n.I18nResource,Object...).
[中]在信息级别记录异常(可丢弃),并附带消息。如果异常为null,则此方法调用#info(org.modeshape.common.i18n.I18nResource,Object…)。
代码示例来源:origin: org.fcrepo/modeshape-jcr
@Override
public void logout() {
try {
loggedIn = false;
if (loginContext != null) loginContext.logout();
} catch (LoginException le) {
LOGGER.info(le, null);
}
}
代码示例来源:origin: ModeShape/modeshape
@Override
public void logout() {
try {
loggedIn = false;
if (loginContext != null) loginContext.logout();
} catch (LoginException le) {
LOGGER.info(le, null);
}
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
@Override
public void info( String message,
Object... params ) {
if (logger.isInfoEnabled()) {
logger.info(new TextI18n(message), params);
}
}
代码示例来源:origin: ModeShape/modeshape
@Override
public void info( String message,
Object... params ) {
if (logger.isInfoEnabled()) {
logger.info(new TextI18n(message), params);
}
}
代码示例来源:origin: ModeShape/modeshape
@Override
public void info( Throwable t,
String message,
Object... params ) {
if (logger.isInfoEnabled()) {
logger.info(t, new TextI18n(message), params);
}
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
@Override
public void info( Throwable t,
String message,
Object... params ) {
if (logger.isInfoEnabled()) {
logger.info(t, new TextI18n(message), params);
}
}
代码示例来源:origin: org.modeshape/modeshape-web-jcr
@Override
public void info( String message,
Object... params ) {
if (logger.isInfoEnabled()) {
logger.info(new TextI18n(message), params);
}
}
代码示例来源:origin: ModeShape/modeshape
@Override
public void info( String message,
Object... params ) {
if (logger.isInfoEnabled()) {
logger.info(new TextI18n(message), params);
}
}
代码示例来源:origin: ModeShape/modeshape
@Override
public void info( Throwable t,
String message,
Object... params ) {
if (logger.isInfoEnabled()) {
logger.info(t, new TextI18n(message), params);
}
}
代码示例来源:origin: org.modeshape/modeshape-web-jcr
@Override
public void info( Throwable t,
String message,
Object... params ) {
if (logger.isInfoEnabled()) {
logger.info(t, new TextI18n(message), params);
}
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
@Override
public void apply( Context resources ) {
LOGGER.info(JcrI18n.upgrade3_6_0Running);
RunningState repository = resources.getRepository();
if (updateInternalNodeTypes(repository)) {
updateLocks(repository);
}
}
代码示例来源:origin: ModeShape/modeshape
@Override
public void apply( Context resources ) {
LOGGER.info(JcrI18n.upgrade3_6_0Running);
RunningState repository = resources.getRepository();
if (updateInternalNodeTypes(repository)) {
updateLocks(repository);
}
}
代码示例来源:origin: ModeShape/modeshape
public static <T extends Number> void writeHistogramToLog( Logger logger,
Histogram<T> histogram,
int barLength,
String description ) {
logger.info(MockI18n.passthrough, description != null ? description : "Histogram:");
List<String> barGraph = histogram.getTextGraph(barLength);
for (String line : barGraph) {
logger.debug(" " + line);
}
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
@Override
public void apply( Context resources ) {
LOGGER.info(JcrI18n.upgrade4_0_0_Beta3_Running);
RunningState runningState = resources.getRepository();
BinaryStore binaryStore = runningState.binaryStore();
try {
if (binaryStore instanceof FileSystemBinaryStore) {
((FileSystemBinaryStore)binaryStore).upgradeTrashContentFormat();
}
} catch (BinaryStoreException e) {
LOGGER.error(e, JcrI18n.upgrade4_0_0_Beta3_Failed, e.getMessage());
}
}
}
代码示例来源:origin: ModeShape/modeshape
@Test
public void shouldLogNoMessagesIfLog4jSetToOffLevel() {
log4jLogger.setLevel(Level.OFF);
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");
assertEquals(false, log.hasEvents());
}
代码示例来源: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
public void shouldQuietlyAcceptNullMessage() {
logger.error(null);
logger.warn(null);
logger.info(null);
logger.debug(null);
logger.trace(null);
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());
}
代码示例来源:origin: ModeShape/modeshape
@Test
public void shouldLogAppropriateMessagesIfLog4jSetToInfoLevel() {
log4jLogger.setLevel(Level.INFO);
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");
log.removeFirst(Logger.Level.INFO, "This is an info message with no parameters");
assertEquals(false, log.hasEvents());
}
代码示例来源:origin: ModeShape/modeshape
@Test
public void shouldNotAcceptMessageWithNonNullAndNullParameters() {
logger.error(errorMessageWithTwoParameters, "first", null);
logger.warn(warningMessageWithTwoParameters, "first", null);
logger.info(infoMessageWithTwoParameters, "first", null);
logger.debug("This is a debug message with a {0} parameter and the {1} parameter", "first", null);
logger.trace("This is a trace message with a {0} parameter and the {1} parameter", "first", null);
log.removeFirst(Logger.Level.ERROR, "This is an error message with a first parameter and the null parameter");
log.removeFirst(Logger.Level.WARNING, "This is a warning message with a first parameter and the null parameter");
log.removeFirst(Logger.Level.INFO, "This is an info message with a first parameter and the null parameter");
log.removeFirst(Logger.Level.DEBUG, "This is a debug message with a first parameter and the null parameter");
log.removeFirst(Logger.Level.TRACE, "This is a trace message with a first parameter and the null parameter");
assertEquals(false, log.hasEvents());
}
内容来源于网络,如有侵权,请联系作者删除!