Code example for Logger

Methods: log

0
     */ 
    public void removePage(final String pageId) throws ServiceException {
        final Transaction transaction = pageRepository.beginTransaction();
 
        try { 
            LOGGER.log(Level.FINER, "Removing a page[id={0}]", pageId);
            removePageComments(pageId);
            pageRepository.remove(pageId);
 
            transaction.commit();
 
        } catch (final Exception e) {
            if (transaction.isActive()) {
                transaction.rollback();
            } 
 
            LOGGER.log(Level.SEVERE, "Removes a page[id=" + pageId + "] failed", e);
 
            throw new ServiceException(e);
        } 
    }