[Fwd: Re: Use NDC to log IP addresses]
Shawn Wilson <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Organization | ATMReports.com |
| Message-ID | <[email protected]> |
Forwarding Jake's response back to the list now that the server is back up. -------- Original Message -------- Subject: Re: [Barracuda] Use NDC to log IP addresses Date: Fri, 13 Jun 2003 10:03:16 -0500 From: Jacob Kjome <[email protected]> To: Shawn Wilson <[email protected]> Hi Shawn, I'm replying directly to you since barracudamvc seems to be down again. That has got to get fixed somehow. Anyway, I haven't looked at your changes yet, but the idea seems sound. However, I wouldn't put this in the ApplicationGateway. I'd put it in a servlet request filter. That way, you can enable/disable this via configuration of web.xml by including or excluding the filter configuration. Plus, it doesn't add anything to ApplicationGateway that doesn't necessarily have anything to do with that class. The servlet filter is definitely the way to go. We could add this to Baracuda as a standard filter if it proves useful. Otherwise, you can just use it in your own codebase enabling the functionality you want without making any modifications to Barracuda. Jake At 02:46 PM 6/12/2003 -0600, Shawn Wilson wrote: > I was thinking about using Log4j's NDC (Nested Diagnostic Context) > mechanism to allow output of the remote IP address in the logs. > Attached to this email is a modified ApplicationGateway that seems to > do the trick. As long as you have the %x pattern defined in your > appender(s) you should be able to see the remote IP address on the > logging statements in your code. > > Jake/Christian: what do you think of this implementation? Is this the > right spot for it? Search for saw_061203_1 to see what I added. > > Any comments would be appreciated. > > Thanks, > -shawn > > -- ==================================== Shawn Wilson [[email protected]] Software Developer, ATMReports.com PH: 877-327-0873, FAX: 406-294-5806 ====================================
smime.p7s
(application/x-pkcs7-signature, 3.4 KB) - not displayed