Hi

Thanks for your reply!
I checked the docs and came up with this, i haven't tested it yet though
but would this be something that could work?

@Bean
>
> public RequestLogHandler jettyRequestLog() {
> RequestLogHandler logHandler = new RequestLogHandler();
> NCSARequestLog requestLog = new NCSARequestLog("logs/requests.log");
> //requestLog.setFilename("");
> requestLog.setFilenameDateFormat("yyyy_MM_dd");
> requestLog.isExtended();
> requestLog.isAppend();
> requestLog.setRetainDays(90);
> logHandler.setRequestLog(requestLog);
>
>
return logHandler;

//Then add in the route
//from("jetty:http://0.0.0.0:9080/myservice?handlers=logHandler";)
}

Den fre 25 feb. 2022 kl 15:33 skrev Claus Ibsen <claus.ib...@gmail.com>:

> Hi
>
> I would look at the Jetty docs to see what logging they have and see
> how to setup that on Jetty.
> Then we can see how to do this in camel-jetty afterwards.
>
>
>
> On Fri, Feb 25, 2022 at 2:14 PM Daniel Johansson <djminb...@gmail.com>
> wrote:
> >
> > Hi
> >
> > We use camel version 2.23.2 and spring-boot version 2.3.12.
> >
> > We can log get access logs for Spring Boot Web Server according to:
> >
> https://docs.spring.io/spring-boot/docs/2.3.x/reference/html/howto.html#howto-configure-accesslogs
> > <
> https://docs.spring.io/spring-boot/docs/2.0.3.RELEASE/reference/html/howto-embedded-web-servers.html#howto-configure-accesslogs
> >
> > (and also
> >
> https://howtodoinjava.com/spring-boot2/logging/embedded-server-logging-config/
> > )
> >
> >
> > How do we get access logs for Camel REST APIs when using camel-jetty,
> i.e.
> >
> >
> > <dependency> <groupId>org.apache.camel</groupId>
> > <artifactId>camel-jetty</artifactId> </dependency>
> >
> > BR
> >
> > /Daniel
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>

Reply via email to