Restlet with logback-access?

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

Restlet with logback-access?

Nick Ver Voort
Hi, I'm trying to integrate logback-access into my webapp, which is Reslet with an embedded Jetty server. I already have logback-classic working, via the restlet slf4j bridge, but access seems to be a whole other beast. Has anybody done this before? Thanks!

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Restlet with logback-access?

Thierry Boileau-4
Hello Nick,

I had a look at your question and made some tests.
I send you a set of files that should help you to connect logback-access.
Please note that this is a first quick version of such integration, just be indulgent.

Once these classes have been integrated into your application:
- add a logback-access.xml at the root of the classpath
- just set the component's log service as follow

        Component c = new Component();
        c.setLogService(new LogbackAccessService());
        c.getLogService().setContext(c.getContext().createChildContext());

I've added a ticket for a better support of logback https://github.com/restlet/restlet-framework-java/issues/1189

I hope this will help you, feel free to ask for more details.

Best regards,
Thierry Boileau

Le lun. 8 févr. 2016 à 19:11, Nick Ver Voort <[hidden email]> a écrit :
Hi, I'm trying to integrate logback-access into my webapp, which is Reslet with an embedded Jetty server. I already have logback-classic working, via the restlet slf4j bridge, but access seems to be a whole other beast. Has anybody done this before? Thanks!

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].

LogbackAccessFilter.java (5K) Download Attachment
RestletAccessContext.java (3K) Download Attachment
LogbackAccessService.java (454 bytes) Download Attachment
RestletServerAdapter.java (1K) Download Attachment
RestletAccessEvent.java (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Restlet with logback-access?

Nick Ver Voort
Thierry, 
After spending some time today integrating this into my application it's working like a charm! 
You've really helped me out, and not for the first time. Let me know if you'd like a Black Duck Software rubber duck as thanks, haha

Regards,
Nick 

On Sun, Feb 14, 2016 at 6:02 AM Thierry Boileau <[hidden email]> wrote:
Hello Nick,

I had a look at your question and made some tests.
I send you a set of files that should help you to connect logback-access.
Please note that this is a first quick version of such integration, just be indulgent.

Once these classes have been integrated into your application:
- add a logback-access.xml at the root of the classpath
- just set the component's log service as follow

        Component c = new Component();
        c.setLogService(new LogbackAccessService());
        c.getLogService().setContext(c.getContext().createChildContext());

I've added a ticket for a better support of logback https://github.com/restlet/restlet-framework-java/issues/1189

I hope this will help you, feel free to ask for more details.

Best regards,
Thierry Boileau

Le lun. 8 févr. 2016 à 19:11, Nick Ver Voort <[hidden email]> a écrit :
Hi, I'm trying to integrate logback-access into my webapp, which is Reslet with an embedded Jetty server. I already have logback-classic working, via the restlet slf4j bridge, but access seems to be a whole other beast. Has anybody done this before? Thanks!

--
You received this message because you are subscribed to the Google Groups "Restlet Framework (Discuss)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].