本文整理了Java中org.modeshape.common.logging.Logger.debug()
方法的一些代码示例,展示了Logger.debug()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.debug()
方法的具体详情如下:
包路径:org.modeshape.common.logging.Logger
类名称:Logger
方法名:debug
[英]Log a message at the DEBUG level according to the specified format and (optional) parameters. The message should contain a pair of empty curly braces for each of the parameter, which should be passed in the correct order. This method is efficient and avoids superfluous object creation when the logger is disabled for the DEBUG level.
[中]根据指定的格式和(可选)参数在调试级别记录消息。消息应该为每个参数包含一对空大括号,并且应该按照正确的顺序传递。此方法非常有效,避免了在调试级别禁用记录器时创建多余的对象。
代码示例来源:origin: ModeShape/modeshape
@Override
public void debug( String message,
Object... params ) {
logger.debug(message, params);
}
代码示例来源:origin: org.modeshape/modeshape-sequencer-xml
@Override
public void error( SAXParseException error ) {
LOGGER.debug(error, "SAX error:");
}
}
代码示例来源:origin: ModeShape/modeshape
private void tryToClose( PreparedStatement statement ) {
if (statement != null) {
try {
statement.close();
} catch (Throwable t) {
LOGGER.debug(t, "Cannot close prepared statement");
}
}
}
代码示例来源:origin: org.modeshape/modeshape-common
@Override
protected Class<?> findClass( String name ) throws ClassNotFoundException {
for (ClassLoader delegate : delegates) {
try {
return delegate.loadClass(name);
} catch (ClassNotFoundException e) {
LOGGER.debug(e, "Cannot load class using delegate: " + delegate.getClass().toString());
}
}
return super.findClass(name);
}
代码示例来源:origin: org.modeshape/modeshape-common
@Override
public URL findResource( String name ) {
for (ClassLoader delegate : delegates) {
try {
return delegate.getResource(name);
} catch (Exception e) {
LOGGER.debug(e, "Cannot load resource using delegate: " + delegate.getClass().toString());
}
}
return super.findResource(name);
}
}
代码示例来源:origin: ModeShape/modeshape
@Override
public void txRolledback( String id ) {
LOGGER.debug("Received rollback notification for tx '{0}'", id);
try {
TransactionStore.Transaction tx = this.transactionalContentById.remove(id).getTransaction();
tx.rollback();
LOGGER.debug("tx '{0}' rolled back", id);
} finally {
ACTIVE_TX_ID.remove();
}
}
代码示例来源:origin: ModeShape/modeshape
private void logDebug(String message, Object...args) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(message, args);
}
}
代码示例来源:origin: ModeShape/modeshape
protected void doShutdown() {
locksByName.forEach((key, lock) -> {
if (releaseLock(lock)) {
logger.debug("{0} unlocked successfully ", key);
} else {
logger.debug("{0} cannot be released...", key);
}
});
}
代码示例来源:origin: org.teiid.modeshape/teiid-modeshape-sequencer-dataservice
private void clearState() {
this.elements.clear();
this.errors.clear();
this.fatals.clear();
this.infos.clear();
this.warnings.clear();
clearDataSourceState();
LOGGER.debug( "cleared all connection reader state" ); //$NON-NLS-1$
}
代码示例来源:origin: org.modeshape/modeshape-common
public StringURLClassLoader( List<String> urls ) {
super(new URL[0], null);
CheckArg.isNotNull(urls, "urls");
for (String url : urls) {
try {
super.addURL(new URL(url));
} catch (MalformedURLException e) {
LOGGER.debug("{0} is not a valid url ", url);
}
}
}
}
代码示例来源:origin: ModeShape/modeshape
/**
* Destroys the physical connection to the underlying resource manager.
*
* @throws ResourceException generic exception if operation fails
*/
@Override
public void destroy() throws ResourceException {
LOGGER.debug("Shutting down connection to repo '{0}'", mcf.getRepositoryURL());
this.session.logout();
this.handles.clear();
}
代码示例来源:origin: ModeShape/modeshape
public StringURLClassLoader( List<String> urls ) {
super(new URL[0], null);
CheckArg.isNotNull(urls, "urls");
for (String url : urls) {
try {
super.addURL(new URL(url));
} catch (MalformedURLException e) {
LOGGER.debug("{0} is not a valid url ", url);
}
}
}
}
代码示例来源:origin: ModeShape/modeshape
@Override
public void restore( String absPath,
Version version,
boolean removeExisting )
throws PathNotFoundException, ItemExistsException, VersionException, ConstraintViolationException,
UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException {
if (LOGGER.isDebugEnabled()) LOGGER.debug("VersionManager.restore('{0}',{1},{2})", absPath, version, removeExisting);
restoreAtAbsPath(absPath, version, removeExisting, true);
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
@Override
public Version checkin( String absPath )
throws VersionException, UnsupportedRepositoryOperationException, InvalidItemStateException, LockException,
RepositoryException {
if (LOGGER.isDebugEnabled()) LOGGER.debug("VersionManager.checkin('{0}')", absPath);
return checkin(session.getNode(absPath));
}
代码示例来源:origin: org.fcrepo/modeshape-jcr
@Override
public BinaryValue storeValue( InputStream stream, String hint, boolean markAsUnused ) throws BinaryStoreException {
BinaryStore binaryStore = selectBinaryStore(hint);
BinaryValue bv = binaryStore.storeValue(stream, markAsUnused);
logger.debug("Stored binary " + bv.getKey() + " into binary store " + binaryStore + " used=" + markAsUnused);
return bv;
}
代码示例来源:origin: org.modeshape/modeshape-sequencer-msoffice
@Override
public void processPOIFSReaderEvent( POIFSReaderEvent event ) {
try {
SummaryInformation si = (SummaryInformation)PropertySetFactory.create(event.getStream());
setSummaryInformation(si);
} catch (Exception ex) {
LOGGER.debug("Error processing the metadata for the MS Office document", ex);
}
}
代码示例来源:origin: ModeShape/modeshape
@Override
public Document get( String key ) {
LOGGER.debug("reading {0}", key);
TransactionStore.TransactionMap<String, Document> txContent = transactionalContent(false);
Document result = txContent != null ? txContent.getLatest(key) : persistedContent.get(key);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("{0} is {1}", key, result);
}
return result;
}
代码示例来源:origin: ModeShape/modeshape
private void writeInitializedAt() {
LOGGER.debug("Marking repository '{0}' as fully initialized", name);
LocalDocumentStore store = documentStore().localStore();
EditableDocument repositoryInfo = store.edit(REPOSITORY_INFO_KEY, true);
if (repositoryInfo.get(REPOSITORY_INITIALIZED_AT_FIELD_NAME) == null) {
DateTime now = context().getValueFactories().getDateFactory().create();
repositoryInfo.setDate(REPOSITORY_INITIALIZED_AT_FIELD_NAME, now.toDate());
}
LOGGER.debug("Repository '{0}' is fully initialized", name);
}
代码示例来源:origin: ModeShape/modeshape
@Override
public void remove( String absPath )
throws UnsupportedOperationException, PathNotFoundException, VersionException, RepositoryException {
if (LOGGER.isDebugEnabled()) LOGGER.debug("VersionManager.remove('{0}')", absPath);
JcrSession removeSession = session.spawnSession(false);
AbstractJcrNode node = removeSession.getNode(absPath);
checkVersionable(node);
SessionCache systemCache = session.createSystemCache(false);
removeHistories(node, systemCache);
node.remove();
removeSession.cache().save(systemCache, null);
}
代码示例来源: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());
}
内容来源于网络,如有侵权,请联系作者删除!