Re: Neutron: Northbound Request and Response logging


Michael Vorburger <vorburger@...>
 

On Tue, Feb 6, 2018 at 11:23 PM, Isaku Yamahata <yamahata@...> wrote:
On Tue, Feb 06, 2018 at 04:35:45PM +0100,
Michael Vorburger <vorburger@...> wrote:

> On Tue, Feb 6, 2018 at 11:23 AM, Dimple Jain <dimple.jain@...>
> wrote:
> > We have a requirement to add logs for the operator level northbound
> > request and response to a separate log file i.e., not to the default karaf
> > log file.
> >
> > This would involve creating one more log handler for the neutron module.
> >
>
> I'm not sure what you mean by "log handler", but why can't you just achieve
> this with tweaking the standard log configuration file?
>
> You should be able to just add an additional file logger thing for neutron
> in the logging config file, no?
>

Regarding to hooking rest request/response, it can be done without
intrusive code modification to add filter and logger. web.xml can be
updated to or something for Jersey and
com.sun.jersey.spi.container.servlet.ServletContainer.
For logging MD-SAL operation, you'd like to see NeutronLogger too.

Dimple, upon re-reading your original email with "add logs for the operator level northbound request and response" I'm guessing you want to log the web requests? AFAIK Jetty (used in Karaf) can actually even produce an Apache compatible access_log, perhaps you want to see how that can be done, most likely just by configuration? If you need more, then like Isaku says, there most likely is an already written Servlet Filter for this, somewhere...
 

Thanks,


> > Should I go ahead and raise a patch for it or would like to have a spec?
> >
> >
> >
> >
> >
> > Thanks & Regards,
> >
> > Dimple.
> >
> >
> >
> > _______________________________________________
> > neutron-dev mailing list
> > neutron-dev@lists.opendaylight.org
> > https://lists.opendaylight.org/mailman/listinfo/neutron-dev
> >
> >

> _______________________________________________
> neutron-dev mailing list
> neutron-dev@lists.opendaylight.org
> https://lists.opendaylight.org/mailman/listinfo/neutron-dev


--
Isaku Yamahata <isaku.yamahata@...>

Join z.archive.neutron-dev@lists.opendaylight.org to automatically receive all group messages.