@Override public void debug( String message, Object... params ) { logger.debug(message, params); }
@Override public void error( SAXParseException error ) { LOGGER.debug(error, "SAX error:"); } }
private void tryToClose( PreparedStatement statement ) { if (statement != null) { try { statement.close(); } catch (Throwable t) { LOGGER.debug(t, "Cannot close prepared statement"); } } }
@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); }
@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); } }
@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(); } }
private void logDebug(String message, Object...args) { if (LOGGER.isDebugEnabled()) { LOGGER.debug(message, args); } }
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$ }
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); } } } }
/** * 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(); }
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); } } } }
@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); }
@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)); }
@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; }
@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); } }
@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; }
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); }
@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); }
@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()); }