Example usage for java.util.logging Level FINEST

List of usage examples for java.util.logging Level FINEST

Introduction

In this page you can find the example usage for java.util.logging Level FINEST.

Prototype

Level FINEST

To view the source code for java.util.logging Level FINEST.

Click Source Link

Document

FINEST indicates a highly detailed tracing message.

Usage

From source file:at.irian.myfaces.wscope.renderkit.html.WsServerSideStateCacheImpl.java

@Override
public Object restoreSerializedView(FacesContext facesContext, String viewId, Object viewState) {
    if (log.isLoggable(Level.FINEST)) {
        log.finest("Restoring view from session");
    }//  w w w.j  av  a  2  s  .  com

    Integer serverStateId = getServerStateId((Object[]) viewState);

    String windowId = calcWindowId(facesContext);

    return (serverStateId == null) ? null
            : getSerializedViewFromServletSession(facesContext, windowId, viewId, serverStateId);
}

From source file:edu.usu.sdl.openstorefront.service.OrientPersistenceService.java

/**
 * This will run the query and then unwrap if desired
 *
 * @param <T>//from  w ww. ja  v a  2  s.  c  om
 * @param query
 * @param parameterMap
 * @param dataClass
 * @param unwrap
 * @return
 */
@Override
public <T> List<T> query(String query, Map<String, Object> parameterMap, Class<T> dataClass, boolean unwrap) {
    OObjectDatabaseTx db = getConnection();
    List<T> results = new ArrayList<>();
    try {
        if (log.isLoggable(Level.FINEST)) {
            log.log(Level.FINEST, query);
        }
        //look for empty collection
        if (parameterMap != null) {
            for (Object value : parameterMap.values()) {
                if (value != null && value instanceof Collection) {
                    if (((Collection) value).isEmpty()) {
                        throw new OpenStorefrontRuntimeException(
                                "Unable to complete query with a empty collection.",
                                "Check query and parameter map");
                    }
                }
            }
        }

        results = db.query(new OSQLSynchQuery<>(query), parameterMap);
        if (unwrap) {
            results = unwrapProxy(db, dataClass, results);
        }
    } finally {
        closeConnection(db);
    }
    return results;
}

From source file:de.akra.idocit.java.services.SimpleJavadocParser.java

@SuppressWarnings("unchecked")
@Override/*from w ww . j a v a  2s  .  com*/
public List<TagElement> findAdditionalTags(final Javadoc javadoc, final List<ThematicRole> knownRoles) {
    List<TagElement> tags = Collections.emptyList();
    if (javadoc != null) {
        tags = new ArrayList<TagElement>(javadoc.tags().size());
        for (TagElement tag : (List<TagElement>) javadoc.tags()) {
            if ((tag.getTagName() != null) && isAdditionalTag(tag.getTagName(), knownRoles)) {
                tags.add(tag);
                log.log(Level.FINEST, "Keep Javadoc tag: " + tag);
            }
        }
    }
    return tags;
}

From source file:org.apache.myfaces.application.ApplicationImpl.java

@Override
public final void setSupportedLocales(final Collection<Locale> locales) {
    checkNull(locales, "locales");

    _supportedLocales = locales;//from w  w w.j a v  a  2  s  .  c  o m
    if (log.isLoggable(Level.FINEST)) {
        log.finest("set SupportedLocales");
    }
}

From source file:brainflow.app.toplevel.BrainFlow.java

private void initLogMonitor() {
    DockableFrame dframe = DockWindowManager.getInstance().createDockableFrame("Log Monitor",
            "icons/console_view.gif", DockContext.STATE_AUTOHIDE, DockContext.DOCK_SIDE_SOUTH, 1);

    LogMonitor monitor = new LogMonitor();
    monitor.setLevel(Level.FINEST);
    LogManager.getLogManager().getLogger("").addHandler(monitor);
    dframe.getContentPane().add(new JScrollPane(monitor.getComponent()));

    dframe.setPreferredSize(new Dimension(800, 200));
    brainFrame.getDockingManager().addFrame(dframe);

}

From source file:com.newrelic.agent.transport.DataSenderImpl.java

private Object invoke(String method, String encoding, String uri, JSONStreamAware params,
        int timeoutInMillis)/* 590:    */ throws Exception
/* 591:    */ {/*w ww  .  j  a v  a  2 s.  c o  m*/
    /* 592:554 */ ReadResult readResult = send(method, encoding, uri, params, timeoutInMillis);
    /* 593:555 */ Map<?, ?> responseMap = null;
    /* 594:556 */ String responseBody = readResult.getResponseBody();
    /* 595:558 */ if (responseBody != null)
    /* 596:    */ {
        /* 597:559 */ Exception ex = null;
        /* 598:    */ try
        /* 599:    */ {
            /* 600:561 */ responseMap = getResponseMap(responseBody);
            /* 601:562 */ ex = parseException(responseMap);
            /* 602:    */ }
        /* 603:    */ catch (Exception e)
        /* 604:    */ {
            /* 605:565 */ Agent.LOG.log(Level.WARNING, "Error parsing response JSON({0}) from NewRelic: {1}",
                    new Object[] { method, e.toString() });
            /* 606:    */
            /* 607:567 */ Agent.LOG.log(Level.FINEST, "Invalid response JSON({0}): {1}",
                    new Object[] { method, responseBody });
            /* 608:    */
            /* 609:569 */ throw e;
            /* 610:    */ }
        /* 611:571 */ if (ex != null) {
            /* 612:572 */ throw ex;
            /* 613:    */ }
        /* 614:    */ }
    /* 615:    */ else
    /* 616:    */ {
        /* 617:576 */ Agent.LOG.log(Level.FINER, "Response was null ({0})", new Object[] { method });
        /* 618:    */ }
    /* 619:579 */ if (responseMap != null) {
        /* 620:580 */ return responseMap.get("return_value");
        /* 621:    */ }
    /* 622:582 */ return null;
    /* 623:    */ }

From source file:edu.umass.cs.reconfiguration.SQLReconfiguratorDB.java

/******************** Incomplete paxos methods below **************/

// write records to a file and return filename
@Override/*w ww. ja  v a2  s .  c  om*/
public String checkpoint(String rcGroup) {
    synchronized (this.stringLocker.get(rcGroup)) {
        String cpFilename = getCheckpointFile(rcGroup);
        if (!this.createCheckpointFile(cpFilename))
            return null;

        if (USE_DISK_MAP) {
            log.log(Level.FINEST,
                    "{0} committing {1} in-memory RC records while getting state for RC group {2} : {3}",
                    new Object[] { this, this.rcRecords.size(), rcGroup, this.rcRecords });
            this.rcRecords.commit();
        }

        PreparedStatement pstmt = null;
        ResultSet recordRS = null;
        Connection conn = null;

        FileWriter writer = null;
        FileOutputStream fos = null;
        boolean exceptions = false;
        String debug = "";

        try {
            conn = this.getDefaultConn();
            pstmt = this.getPreparedStatement(conn, getRCRecordTable(), null,
                    Columns.STRINGIFIED_RECORD.toString(),
                    " where " + Columns.RC_GROUP_NAME.toString() + "='" + rcGroup + "'");
            recordRS = pstmt.executeQuery();

            // first wipe out the file
            (writer = new FileWriter(cpFilename, false)).close();
            ;
            // then start appending to the clean slate
            fos = new FileOutputStream(new File(cpFilename));
            // writer = new FileWriter(cpFilename, true);

            while (recordRS.next()) {
                String msg = recordRS.getString(1);
                ReconfigurationRecord<NodeIDType> rcRecord = new ReconfigurationRecord<NodeIDType>(
                        new JSONObject(msg), this.consistentNodeConfig);
                fos.write((rcRecord.toString() + "\n").getBytes(CHARSET));
                if (debug.length() < 64 * 1024)
                    debug += "\n" + rcRecord;
            }
        } catch (SQLException | JSONException | IOException e) {
            log.severe(e.getClass().getSimpleName() + " while creating checkpoint for " + rcGroup + ":");
            e.printStackTrace();
            exceptions = true;
        } finally {
            cleanup(pstmt, recordRS);
            cleanup(conn);
            cleanup(writer);
            cleanup(fos);
        }
        log.log(Level.FINE, "{0} returning state for {1}:{2}; wrote to file:\n{3}",
                new Object[] { this, rcGroup, this.getCheckpointDir() + rcGroup, debug });
        // return filename, not actual checkpoint
        if (!exceptions) {
            this.deleteOldCheckpoints(rcGroup, 3);
            return LargeCheckpointer.createCheckpointHandle(cpFilename); // this.getCheckpointURL(cpFilename);
        }
        // else
        return null;
    }
}

From source file:org.apache.myfaces.application.ApplicationImpl.java

/**
 * @deprecated//w w  w .  j a v a  2  s. c  o  m
 */
@Deprecated
@Override
public final void setVariableResolver(final VariableResolver variableResolver) {
    checkNull(variableResolver, "variableResolver");

    if (isFirstRequestProcessed()) {
        throw new IllegalStateException("variableResolver must be defined before request processing");
    }

    _runtimeConfig.setVariableResolver(variableResolver);

    if (log.isLoggable(Level.FINEST)) {
        log.finest("set VariableResolver = " + variableResolver.getClass().getName());
    }
}

From source file:org.apache.myfaces.ov2021.application.jsp.JspStateManagerImpl.java

protected Object deserializeView(Object state) {
    if (log.isLoggable(Level.FINEST))
        log.finest("Entering deserializeView");

    if (state instanceof byte[]) {
        if (log.isLoggable(Level.FINEST))
            log.finest("Processing deserializeView - deserializing serialized state. Bytes : "
                    + ((byte[]) state).length);

        try {/*from ww w.  ja v  a  2s.  c om*/
            ByteArrayInputStream bais = new ByteArrayInputStream((byte[]) state);
            InputStream is = bais;
            if (is.read() == COMPRESSED_FLAG) {
                is = new GZIPInputStream(is);
            }
            ObjectInputStream ois = null;
            try {
                final ObjectInputStream in = new MyFacesObjectInputStream(is);
                ois = in;
                Object object = null;
                if (System.getSecurityManager() != null) {
                    object = AccessController.doPrivileged(new PrivilegedExceptionAction<Object[]>() {
                        public Object[] run()
                                throws PrivilegedActionException, IOException, ClassNotFoundException {
                            return new Object[] { in.readObject(), in.readObject() };
                        }
                    });
                } else {
                    object = new Object[] { in.readObject(), in.readObject() };
                }
                return object;
            } finally {
                if (ois != null) {
                    ois.close();
                    ois = null;
                }
            }
        } catch (PrivilegedActionException e) {
            log.log(Level.SEVERE, "Exiting deserializeView - Could not deserialize state: " + e.getMessage(),
                    e);
            return null;
        } catch (IOException e) {
            log.log(Level.SEVERE, "Exiting deserializeView - Could not deserialize state: " + e.getMessage(),
                    e);
            return null;
        } catch (ClassNotFoundException e) {
            log.log(Level.SEVERE, "Exiting deserializeView - Could not deserialize state: " + e.getMessage(),
                    e);
            return null;
        }
    } else if (state instanceof Object[]) {
        if (log.isLoggable(Level.FINEST))
            log.finest("Exiting deserializeView - state not serialized.");

        return state;
    } else if (state == null) {
        log.severe("Exiting deserializeView - this method should not be called with a null-state.");
        return null;
    } else {
        log.severe("Exiting deserializeView - this method should not be called with a state of type : "
                + state.getClass());
        return null;
    }
}