You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Neil Bartlett (JIRA)" <ji...@apache.org> on 2017/11/14 20:15:01 UTC

[jira] [Comment Edited] (FELIX-5744) Felix HTTP Jetty does not support request logging

    [ https://issues.apache.org/jira/browse/FELIX-5744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16252098#comment-16252098 ] 

Neil Bartlett edited comment on FELIX-5744 at 11/14/17 8:14 PM:
----------------------------------------------------------------

Resolved in r1815249, r1815252 (fix for previous rev) and r1815258 (apply to R7).

This update enables request logging in the following ways:

# Bundles can register a service of type RequestLog (from package
org.eclipse.jetty.server, already exported by the org.apache.felix.http.jetty
bundle). The Felix Jetty bundle will dispatch request messages to all
registered RequestLog services, or it can be configured with a filter to
dispatch only to a subset of service.
# The Felix Jetty bundle provides an implementation of RequestLog that forwards
messages to the OSGi Log Service. This is disabled by default and must be
enabled with the system/config property
"org.apache.felix.http.requestlog.osgi.enable".
# The Felix Jetty bundle additionally allows an instance of Jetty's built-in
NCSARequestLog to be created to write to an external file. This logger is
enabled by providing the "org.apache.felix.http.requestlog.file.path"
property. Various other properties can be provided that control e.g.
append/overwrite, sync/async, ignored request paths, etc.

N.B.: this code uses Java 8. This should not be a problem since the version of
Jetty used also depends on Java 8, however it was necessary to disable
animal-sniffer in the module as it does not support Java 8 as configured. This
is already done in the gogo/jline and gogo/runtime modules.


was (Author: nbartlett):
Resolved in r1815249, r1815252 (fix for previous rev) and r1815258 (apply to R7).

This update enables request logging in the following ways:

# Bundles can register a service of type RequestLog (from package
org.eclipse.jetty.server, already exported by the org.apache.felix.http.jetty
bundle). The Felix Jetty bundle will dispatch request messages to all
registered RequestLog services, or it can be configured with a filter to
dispatch only to a subset of service.

# The Felix Jetty bundle provides an implementation of RequestLog that forwards
messages to the OSGi Log Service. This is disabled by default and must be
enabled with the system/config property
"org.apache.felix.http.requestlog.osgi.enable".

# The Felix Jetty bundle additionally allows an instance of Jetty's built-in
NCSARequestLog to be created to write to an external file. This logger is
enabled by providing the "org.apache.felix.http.requestlog.file.path"
property. Various other properties can be provided that control e.g.
append/overwrite, sync/async, ignored request paths, etc.

N.B.: this code uses Java 8. This should not be a problem since the version of
Jetty used also depends on Java 8, however it was necessary to disable
animal-sniffer in the module as it does not support Java 8 as configured. This
is already done in the gogo/jline and gogo/runtime modules.

> Felix HTTP Jetty does not support request logging
> -------------------------------------------------
>
>                 Key: FELIX-5744
>                 URL: https://issues.apache.org/jira/browse/FELIX-5744
>             Project: Felix
>          Issue Type: Improvement
>          Components: HTTP Service
>    Affects Versions: http.jetty-3.4.6
>            Reporter: Neil Bartlett
>
> Request logging is an important feature for a production web server. Although Jetty supports request logging there are no hooks in the Felix HTTP Jetty embedding that allow for a log to be configured.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)