Hi Avinash , any luck on this ? On Thursday, May 12, 2016 at 11:44:47 PM UTC+5:30, avinash katika wrote: > > Looks like https://github.com/dropwizard/dropwizard/issues/972 > <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fdropwizard%2Fdropwizard%2Fissues%2F972&sa=D&sntz=1&usg=AFQjCNE96pDjHl8dfMgOul4MV3tpsBfVCg> > is > comitted. > > I have a similar requirement where I need to add request port being used > by request.Is that still feasible with approach. > > I don't see any information provided in Dropwizard regarding this.Any > pointers where I could find more information customizing request log format. > > > On Friday, May 8, 2015 at 9:44:42 AM UTC-4, Carlo Barbara wrote: >> >> It's not implemented, and there is not commitment on a timeline. >> >> https://github.com/dropwizard/dropwizard/issues/972 >> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fdropwizard%2Fdropwizard%2Fissues%2F972&sa=D&sntz=1&usg=AFQjCNE96pDjHl8dfMgOul4MV3tpsBfVCg> >> >> On Fri, May 8, 2015 at 9:11 AM Georg Meyer <[email protected]> >> wrote: >> >>> Any news on this one? This is not integrated into dropwizard 8.1, right? >>> >>> >>> Am Dienstag, 28. Oktober 2014 07:01:00 UTC+1 schrieb Javier Campanini: >>>> >>>> To go into more detail: >>>> >>>> We're attempting to add the username to the request log. We're using >>>> Shiro for authentication, and using a Servlet Filter to pull the username >>>> into the org.slf4j.MDC. >>>> >>>> Our resulting pattern is: >>>> %mdc{user:-anon} - %m%n%xEx >>>> >>>> >>>> >>>> On Monday, October 27, 2014 2:58:30 PM UTC-4, Javier Campanini wrote: >>>>> >>>>> Jamie, >>>>> >>>>> As a temporary solution, I'm planning on writing a custom appender >>>>> that extends Console, where the build method does one thing: calls the >>>>> super.build() with a null for layout. That way it'll build a normal >>>>> DropwizardLayout. >>>>> >>>>> Would that cause any problems? Is this a viable solution? >>>>> >>>>> Thanks! >>>>> -javi >>>>> >>>>> >>>>> On Monday, October 27, 2014 1:56:57 PM UTC-4, Jamie Furness wrote: >>>>>> >>>>>> Hi Javier. At current Dropwizard uses the Jetty NSCA request logger, >>>>>> that doesn't support custom formats. There is a pull request (#580) that >>>>>> changes Dropwizard to use logback-access which would do exactly what you >>>>>> want, though it's blocked on the next version of logback being released. >>>>>> I >>>>>> haven't had any word from the developers if this is likely to be merged >>>>>> once logback is updated, but I hope so. >>>>>> On 27 Oct 2014 17:08, "Javier Campanini" <[email protected]> wrote: >>>>>> >>>>>>> I'm trying to get a custom log format for the Request Logger. In >>>>>>> particular, something like this: >>>>>>> >>>>>>> server: >>>>>>> requestLog: >>>>>>> appenders: >>>>>>> - type: console >>>>>>> logFormat: an-actual-log-format-here %m%n >>>>>>> >>>>>>> This seems to be documented: >>>>>>> http://dropwizard.io/manual/configuration.html#request-log >>>>>>> >>>>>>> But in practice, I can't get the log format to be respected by the >>>>>>> Request Logger. It seems the chain of events are: >>>>>>> >>>>>>> - RequestLogFactory#build calls the appender factory's build >>>>>>> method with an existing Layout: >>>>>>> >>>>>>> https://github.com/dropwizard/dropwizard/blob/master/dropwizard-jetty/src/main/java/io/dropwizard/jetty/RequestLogFactory.java#L98 >>>>>>> - ConsoleAppenderFactory#build only builds a layout if one isn't >>>>>>> provided: >>>>>>> >>>>>>> https://github.com/dropwizard/dropwizard/blob/master/dropwizard-logging/src/main/java/io/dropwizard/logging/ConsoleAppenderFactory.java#L110 >>>>>>> - It never sets the pattern: >>>>>>> >>>>>>> https://github.com/dropwizard/dropwizard/blob/master/dropwizard-logging/src/main/java/io/dropwizard/logging/AbstractAppenderFactory.java#L133 >>>>>>> >>>>>>> My questions are: >>>>>>> >>>>>>> 1. Is there a way to set the pattern for the Request Logger? >>>>>>> 2. Is this a bug that the pattern for the request logger is >>>>>>> ignored? >>>>>>> >>>>>>> Thanks, >>>>>>> -javi >>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "dropwizard-user" group. >>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>> send an email to [email protected]. >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>> >>>>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "dropwizard-user" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >>
-- You received this message because you are subscribed to the Google Groups "dropwizard-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
