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:com.brainflow.application.toplevel.Brainflow.java

private void initLogMonitor() {
    DockableFrame dframe = DockWindowManager.getInstance().createDockableFrame("Log Monitor",
            "resources/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:org.archive.modules.extractor.ExtractorHTML.java

/**
 * Handle generic HREF cases.// w ww  .j a v a  2 s .co  m
 * 
 * @param curi
 * @param value
 * @param context
 */
protected void processLink(CrawlURI curi, final CharSequence value, CharSequence context) {
    if (TextUtils.matches(JAVASCRIPT, value)) {
        processScriptCode(curi, value.subSequence(11, value.length()));
    } else {
        if (logger.isLoggable(Level.FINEST)) {
            logger.finest("link: " + value.toString() + " from " + curi);
        }
        addLinkFromString(curi, value, context, Hop.NAVLINK);
        numberOfLinksExtracted.incrementAndGet();
    }
}

From source file:org.apache.reef.io.network.NetworkServiceTest.java

/**
 * NetworkService messaging rate benchmark.
 *///from  ww  w. j a v a2  s.c  om
@Test
public void testMessagingNetworkServiceBatchingRate() throws Exception {

    Assume.assumeFalse("Use log level INFO to run benchmarking", LOG.isLoggable(Level.FINEST));

    LOG.log(Level.FINEST, name.getMethodName());

    final IdentifierFactory factory = new StringIdentifierFactory();

    final Injector injector = Tang.Factory.getTang().newInjector();
    injector.bindVolatileParameter(NameServerParameters.NameServerIdentifierFactory.class, factory);
    injector.bindVolatileInstance(LocalAddressProvider.class, this.localAddressProvider);

    try (final NameServer server = injector.getInstance(NameServer.class)) {
        final int nameServerPort = server.getPort();

        final int batchSize = 1024 * 1024;
        final int[] messageSizes = { 32, 64, 512 };

        for (final int size : messageSizes) {
            final int numMessages = 300 / (Math.max(1, size / 512));
            final Monitor monitor = new Monitor();

            // network service
            final String name2 = "task2";
            final String name1 = "task1";
            final Configuration nameResolverConf = Tang.Factory.getTang()
                    .newConfigurationBuilder(NameResolverConfiguration.CONF
                            .set(NameResolverConfiguration.NAME_SERVER_HOSTNAME, this.localAddress)
                            .set(NameResolverConfiguration.NAME_SERVICE_PORT, nameServerPort).build())
                    .build();

            final Injector injector2 = Tang.Factory.getTang().newInjector(nameResolverConf);

            LOG.log(Level.FINEST, "=== Test network service receiver start");
            LOG.log(Level.FINEST, "=== Test network service sender start");
            try (final NameResolver nameResolver = injector2.getInstance(NameResolver.class)) {
                injector2.bindVolatileParameter(NetworkServiceParameters.NetworkServiceIdentifierFactory.class,
                        factory);
                injector2.bindVolatileInstance(NameResolver.class, nameResolver);
                injector2.bindVolatileParameter(NetworkServiceParameters.NetworkServiceCodec.class,
                        new StringCodec());
                injector2.bindVolatileParameter(NetworkServiceParameters.NetworkServiceTransportFactory.class,
                        injector.getInstance(MessagingTransportFactory.class));
                injector2.bindVolatileParameter(NetworkServiceParameters.NetworkServiceExceptionHandler.class,
                        new ExceptionHandler());

                final Injector injectorNs2 = injector2.forkInjector();
                injectorNs2.bindVolatileParameter(NetworkServiceParameters.NetworkServiceHandler.class,
                        new MessageHandler<String>(name2, monitor, numMessages));
                final NetworkService<String> ns2 = injectorNs2.getInstance(NetworkService.class);

                final Injector injectorNs1 = injector2.forkInjector();
                injectorNs1.bindVolatileParameter(NetworkServiceParameters.NetworkServiceHandler.class,
                        new MessageHandler<String>(name1, null, 0));
                final NetworkService<String> ns1 = injectorNs1.getInstance(NetworkService.class);

                ns2.registerId(factory.getNewInstance(name2));
                final int port2 = ns2.getTransport().getListeningPort();
                server.register(factory.getNewInstance("task2"),
                        new InetSocketAddress(this.localAddress, port2));

                ns1.registerId(factory.getNewInstance(name1));
                final int port1 = ns1.getTransport().getListeningPort();
                server.register(factory.getNewInstance("task1"),
                        new InetSocketAddress(this.localAddress, port1));

                final Identifier destId = factory.getNewInstance(name2);
                final String message = StringUtils.repeat('1', batchSize);

                final long start = System.currentTimeMillis();
                try (Connection<String> conn = ns1.newConnection(destId)) {
                    conn.open();
                    for (int i = 0; i < numMessages; i++) {
                        conn.write(message);
                    }
                    monitor.mwait();
                } catch (final NetworkException e) {
                    e.printStackTrace();
                    throw new RuntimeException(e);
                }
                final long end = System.currentTimeMillis();
                final double runtime = ((double) end - start) / 1000;
                final long numAppMessages = numMessages * batchSize / size;
                LOG.log(Level.FINEST, "size: " + size + "; messages/s: " + numAppMessages / runtime
                        + " bandwidth(bytes/s): " + ((double) numAppMessages * 2 * size) / runtime); // x2 for unicode chars
            }
        }
    }
}

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

@Override
public String getViewState(FacesContext facesContext) {
    UIViewRoot uiViewRoot = facesContext.getViewRoot();
    String viewId = uiViewRoot.getViewId();
    ViewDeclarationLanguage vdl = facesContext.getApplication().getViewHandler()
            .getViewDeclarationLanguage(facesContext, viewId);
    if (vdl != null) {
        StateManagementStrategy sms = vdl.getStateManagementStrategy(facesContext, viewId);

        if (sms != null) {
            if (log.isLoggable(Level.FINEST))
                log.finest("Calling saveView of StateManagementStrategy from getViewState: "
                        + sms.getClass().getName());

            return facesContext.getRenderKit().getResponseStateManager().getViewState(facesContext,
                    saveView(facesContext));
        }//w ww.  j a  v  a2  s .  c  o m
    }
    Object[] savedState = (Object[]) saveView(facesContext);

    if (!isSavingStateInClient(facesContext)) {
        Object[] state = new Object[2];
        state[JSF_SEQUENCE_INDEX] = Integer.toString(getNextViewSequence(facesContext), Character.MAX_RADIX);
        return facesContext.getRenderKit().getResponseStateManager().getViewState(facesContext, state);
    } else {
        return facesContext.getRenderKit().getResponseStateManager().getViewState(facesContext, savedState);
    }
}

From source file:com.sun.grizzly.http.jk.common.ChannelNioSocket.java

@Override
public int invoke(Msg msg, MsgContext ep) throws IOException {
    int type = ep.getType();

    switch (type) {
    case JkHandler.HANDLE_RECEIVE_PACKET:
        if (LoggerUtils.getLogger().isLoggable(Level.FINEST)) {
            LoggerUtils.getLogger().log(Level.FINEST, "RECEIVE_PACKET ?? ");
        }/*from w  ww . j  a  v a  2  s  .  c o  m*/
        return receive(msg, ep);
    case JkHandler.HANDLE_SEND_PACKET:
        return send(msg, ep);
    case JkHandler.HANDLE_FLUSH:
        return flush(msg, ep);
    }

    if (LoggerUtils.getLogger().isLoggable(Level.FINE)) {
        LoggerUtils.getLogger().log(Level.FINE, "Call next " + type + " " + next);
    }

    // Send notification
    if (nSupport != null) {
        Notification notif = (Notification) ep.getNote(notifNote);
        if (notif == null) {
            notif = new Notification("channelNioSocket.message", ep, requestCount);
            ep.setNote(notifNote, notif);
        }
        nSupport.sendNotification(notif);
    }

    if (next != null) {
        return next.invoke(msg, ep);
    } else {
        LoggerUtils.getLogger().info("No next ");
    }

    return OK;
}

From source file:org.archive.modules.extractor.ExtractorHTML.java

protected void processEmbed(CrawlURI curi, final CharSequence value, CharSequence context, Hop hop) {
    if (logger.isLoggable(Level.FINEST)) {
        logger.finest("embed (" + hop.getHopChar() + "): " + value.toString() + " from " + curi);
    }// w  w w .  jav a  2s  .com
    addLinkFromString(curi, (value instanceof String) ? (String) value : value.toString(), context, hop);
    numberOfLinksExtracted.incrementAndGet();
}

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

@Override
public final void setActionListener(final ActionListener actionListener) {
    checkNull(actionListener, "actionListener");

    _actionListener = actionListener;/* ww  w . j ava 2s  . c  o m*/
    if (log.isLoggable(Level.FINEST)) {
        log.finest("set actionListener = " + actionListener.getClass().getName());
    }
}

From source file:tigase.muc.modules.PresenceModule.java

/**
 * Method description//from  w w  w  .  j a v  a2s  .c om
 * 
 * 
 * @param room
 * @param presenceElement
 * @param senderJID
 * @param nickname
 * 
 * @throws TigaseStringprepException
 */
protected void processChangeAvailabilityStatus(final Room room, final Element presenceElement,
        final JID senderJID, final String nickname) throws TigaseStringprepException {
    if (log.isLoggable(Level.FINEST)) {
        log.finest("Processing stanza " + presenceElement.toString());
    }
    room.updatePresenceByJid(null, clonePresence(presenceElement));

    Element pe = room.getLastPresenceCopyByJid(senderJID.getBareJID());

    sendPresenceToAllOccupants(pe, room, senderJID, false, null);
}

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

/**
 * MyFaces extension//  w  ww  . j a  va 2s.  c  om
 * @param facesContext
 * @param serializedView
 * @throws IOException
 */
@Override
public void writeStateAsUrlParams(FacesContext facesContext, SerializedView serializedView) throws IOException {
    if (log.isLoggable(Level.FINEST))
        log.finest("Entering writeStateAsUrlParams");

    if (isSavingStateInClient(facesContext)) {
        if (log.isLoggable(Level.FINEST))
            log.finest("Processing writeStateAsUrlParams - client-side state saving writing state");

        UIViewRoot uiViewRoot = facesContext.getViewRoot();
        //save state in response (client)
        RenderKit renderKit = getRenderKitFactory().getRenderKit(facesContext, uiViewRoot.getRenderKitId());
        ResponseStateManager responseStateManager = renderKit.getResponseStateManager();
        if (responseStateManager instanceof MyfacesResponseStateManager) {
            ((MyfacesResponseStateManager) responseStateManager).writeStateAsUrlParams(facesContext,
                    serializedView);
        } else {
            log.severe("ResponseStateManager of render kit " + uiViewRoot.getRenderKitId()
                    + " is no MyfacesResponseStateManager and does not support saving state in url parameters.");
        }
    }

    if (log.isLoggable(Level.FINEST))
        log.finest("Exiting writeStateAsUrlParams");
}

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

@Override
public final void setDefaultLocale(final Locale locale) {
    checkNull(locale, "locale");

    _defaultLocale = locale;//from w  ww .j a v  a2  s. c  o  m
    if (log.isLoggable(Level.FINEST)) {
        log.finest("set defaultLocale = " + locale.getCountry() + " " + locale.getLanguage());
    }
}