APISonar


org.glassfish.jersey.internal.util.ExtendedLogger.log

> org > glassfish > jersey > internal > util > ExtendedLogger > log
org APIs glassfish APIs jersey APIs internal APIs util APIs ExtendedLogger APIs log APIs

Example 1
private static final ExtendedLogger LOGGER =
            new ExtendedLogger(Logger.getLogger(ServletContainer.class.getName()), Level.FINEST);

    private void setResponseForInvalidUri(final HttpServletResponse response, final Throwable throwable) throws IOException {
        LOGGER.log(Level.FINER, "Error while processing request.", throwable);

        final Response.Status badRequest = Response.Status.BAD_REQUEST;
        if (webComponent.configSetStatusOverSendError) {
            response.reset();
            //noinspection deprecation
            response.setStatus(badRequest.getStatusCode(), badRequest.getReasonPhrase());
        } else {
            response.sendError(badRequest.getStatusCode(), badRequest.getReasonPhrase());
        }
    }
Example 2
private static final ExtendedLogger LOGGER =
            new ExtendedLogger(Logger.getLogger(EventProcessor.class.getName()), Level.FINEST);

    private void notify(final EventListener listener, final InboundEvent event) {
        try {
            listener.onEvent(event);
        } catch (Exception ex) {
            if (LOGGER.isLoggable(Level.FINE)) {
                LOGGER.log(Level.FINE, String.format("Event notification in a listener of %s class failed.",
                        listener.getClass().getName()), ex);
            }
        }
    }
Example 3
private static final ExtendedLogger LOGGER =
            new ExtendedLogger(Logger.getLogger(ServletContainer.class.getName()), Level.FINEST);

    public void reload(final ResourceConfig configuration) {
        try {
            containerListener.onShutdown(this);

            webComponent = new WebComponent(webComponent.webConfig, configuration);
            containerListener = webComponent.appHandler;
            containerListener.onReload(this);
            containerListener.onStartup(this);
        } catch (final ServletException ex) {
            LOGGER.log(Level.SEVERE, "Reload failed", ex);
        }
    }