Jetty 9.3 access logging recommended configuration

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Jetty 9.3 access logging recommended configuration

Scott Koranda-2
Hi,

I noticed that between Jetty 9.2 and 9.3 the distributed (by
the Jetty project) jetty-requestlog.xml file changed, but I
think the recommended (by the Shib project) configuration
for Jetty accesss logging did not.

I apologize for the simple minded question, but has anybody
from the dev team done a straightforward deployment
following the instructions at

https://wiki.shibboleth.net/confluence/display/IDP30/Jetty93

and as a result had JETTY_BASE/logs/access.log created and
populated properly?

Thanks,

Scott K
--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Jetty 9.3 access logging recommended configuration

Cantor, Scott E.
On 11/18/15, 1:03 PM, "dev on behalf of Scott Koranda" <[hidden email] on behalf of [hidden email]> wrote:



>I noticed that between Jetty 9.2 and 9.3 the distributed (by
>the Jetty project) jetty-requestlog.xml file changed, but I
>think the recommended (by the Shib project) configuration
>for Jetty accesss logging did not.

I didn't notice it changed. I was focused on working around all the bugs they introduced. I don't see any sign that the access log was created so I'm sure whatever worked before no longer does. If they changed the interface, I doubt logback has an implementation of it.

-- Scott

--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Jetty 9.3 access logging recommended configuration

Tom Zeller-3

>> I noticed that between Jetty 9.2 and 9.3 the distributed (by
>> the Jetty project) jetty-requestlog.xml file changed, but I
>> think the recommended (by the Shib project) configuration
>> for Jetty accesss logging did not.
>
> working around all the bugs they introduced.

Linking to relevant issue IDP-775.

https://issues.shibboleth.net/jira/browse/IDP-775
--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Jetty 9.3 access logging recommended configuration

Scott Koranda-2
In reply to this post by Cantor, Scott E.
> On 11/18/15, 1:03 PM, "dev on behalf of Scott Koranda" <[hidden email] on behalf of [hidden email]> wrote:
>
>
>
> >I noticed that between Jetty 9.2 and 9.3 the distributed (by
> >the Jetty project) jetty-requestlog.xml file changed, but I
> >think the recommended (by the Shib project) configuration
> >for Jetty accesss logging did not.
>
> I didn't notice it changed. I was focused on working
> around all the bugs they introduced. I don't see any sign
> that the access log was created so I'm sure whatever
> worked before no longer does. If they changed the
> interface, I doubt logback has an implementation of it.
 
Thanks for the note.

Looking at the documentation and the GitHub repository I
cannot see that the interface itself for RequestLog changed,
but I also have not yet been able to come up with a
configuration that works.

I will be putting a bit more time into it and if I get it I
will update the wiki (I see you already removed the config
that doesn't work).

Thanks,

Scott K
--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Jetty 9.3 access logging recommended configuration

Marvin Addison
In reply to this post by Scott Koranda-2
has anybody
from the dev team done a straightforward deployment
following the instructions at

https://wiki.shibboleth.net/confluence/display/IDP30/Jetty93

and as a result had JETTY_BASE/logs/access.log created and
populated properly?

I followed the instructions, but I hadn't realized until this thread that my access logging is broken as you described. I don't see any cause for the breakage, so I'm as puzzled as you are. I'm continuing to investigate.



--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Jetty 9.3 access logging recommended configuration

Marvin Addison
 I'm continuing to investigate.

I think I found a hint:


I'm going to try that and follow up.

M


--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Jetty 9.3 access logging recommended configuration

Scott Koranda-2
>      I'm continuing to investigate.
>
>
> I think I found a hint:
>
> https://github.com/eclipse/jetty.project/commit/
> e3bda4efbefa2370d7d9b594aa97dc60a2b37235
>
> I'm going to try that and follow up.

Thanks.

For the record I have been trying to set on the server
following the jetty-requestlog.xml example distributed with
9.3.

My last try was the simple-minded

<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <Set name="requestLog">
    <New id="RequestLogImpl" class="ch.qos.logback.access.jetty.RequestLogImpl">
      <Set name="fileName"><Property name="jetty.base" default="." />/resources/logback-access.xml</Set>
    </New>
  </Set>
</Configure>

I have not tried a handler on a specific context, only because I would
prefer a server wide access log (since I like to serve some static things
off to the side in a different context but would like to see the
access logs for those too).

HTH,

Scott K
--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Jetty 9.3 access logging recommended configuration

Marvin Addison
<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <Set name="requestLog">
    <New id="RequestLogImpl" class="ch.qos.logback.access.jetty.RequestLogImpl">
      <Set name="fileName"><Property name="jetty.base" default="." />/resources/logback-access.xml</Set>
    </New>
  </Set>
</Configure>

Using a debugger and stepping into the Jetty request handling code, I've confirmed that the above properly sets the logback RequestLogImpl on the Jetty Server component. I've also confirmed that the log(Request, Response) method on that object is being invoked, but it's not doing anything because the component is uninitialized. It's not clear how the start() method ever got called to perform initialization, but at least I have a lead on where to go to fix.



--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Jetty 9.3 access logging recommended configuration

Marvin Addison
It's not clear how the start() method ever got called to perform initialization, but at least I have a lead on where to go to fix.

Calling start() fixed it. Simply add the following after the <Set> element:

  <Ref refid="RequestLog">
    <Call name="start" />
  </Ref> 

I'll update the Wiki.

M


--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Jetty 9.3 access logging recommended configuration

Scott Koranda-2
>     It's not clear how the start() method ever got called to perform
>     initialization, but at least I have a lead on where to go to fix.
>
>
> Calling start() fixed it. Simply add the following after the <Set> element:
>
>   <Ref refid="RequestLog">
>     <Call name="start" />
>   </Ref> 
>
> I'll update the Wiki.
>

Nice.

Thank you,

Scott K
--
To unsubscribe from this list send an email to [hidden email]