Re: Logging properties of attributes in the HttpSession

2011-10-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Konstantin, On 10/3/2011 4:16 PM, Konstantin Kolinko wrote: > 2011/10/3 Christopher Schultz : >> On 9/30/2011 2:18 PM, Konstantin Kolinko wrote: >>> 2011/9/30 Christopher Schultz : The OP should be able to put the Filter into the in such a

Re: Logging properties of attributes in the HttpSession

2011-10-03 Thread Konstantin Kolinko
2011/10/3 Christopher Schultz : > On 9/30/2011 2:18 PM, Konstantin Kolinko wrote: >> 2011/9/30 Christopher Schultz : >>> The OP should be able to put the Filter into the in >>> such a way that the Filter wraps the AccessLogValve, no? >>> >> >> 1. You cannot put a Filter into Context. > > Mmm. Why

Re: Logging properties of attributes in the HttpSession

2011-10-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Konstantin, On 9/30/2011 2:18 PM, Konstantin Kolinko wrote: > 2011/9/30 Christopher Schultz : >> The OP should be able to put the Filter into the in >> such a way that the Filter wraps the AccessLogValve, no? >> > > 1. You cannot put a Filter into

Re: Logging properties of attributes in the HttpSession

2011-09-30 Thread Konstantin Kolinko
2011/9/30 Christopher Schultz : > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Konstantin, > > On 9/30/2011 9:27 AM, Konstantin Kolinko wrote: >> 2011/9/30 André Warnier : >>> Pid * wrote: The changes from the Spring security filter can't be seen by the access log valve.

Re: Logging properties of attributes in the HttpSession

2011-09-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Konstantin, On 9/30/2011 9:27 AM, Konstantin Kolinko wrote: > 2011/9/30 André Warnier : >> Pid * wrote: >>> >>> The changes from the Spring security filter can't be seen by >>> the access log valve. >>> >> And is the "why?" left as an exercise to th

Re: Logging properties of attributes in the HttpSession

2011-09-30 Thread Konstantin Kolinko
2011/9/30 André Warnier : > Pid * wrote: >> >> The changes from the Spring security filter can't be seen by the >> access log valve. >> > And is the "why?" left as an exercise to the reader ? > Because logging happens after request processing is completed, and a filter affects only what happens "i

Re: Logging properties of attributes in the HttpSession

2011-09-30 Thread André Warnier
Pid * wrote: The changes from the Spring security filter can't be seen by the access log valve. And is the "why?" left as an exercise to the reader ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional

Re: Logging properties of attributes in the HttpSession

2011-09-30 Thread Pid *
The changes from the Spring security filter can't be seen by the access log valve. p On 30 Sep 2011, at 12:40, Richard Sayre wrote: > I'm still having some trouble. I added the Spring filter and then in > my web app I called: > > getRequest().getRemoteUser() and getRequest().getUserPrincipal()

Re: Logging properties of attributes in the HttpSession

2011-09-30 Thread Richard Sayre
I'm still having some trouble. I added the Spring filter and then in my web app I called: getRequest().getRemoteUser() and getRequest().getUserPrincipal().getName() Both methods returned the logged in user name. (getRequest() returns the HttpServletRequest) However, in the logs %u is still re

Re: Logging properties of attributes in the HttpSession

2011-09-29 Thread Richard Sayre
Ahh yes I just discovered it when you replied: http://static.springsource.org/spring-security/site/docs/3.0.x/apidocs/org/springframework/security/web/servletapi/SecurityContextHolderAwareRequestFilter.html Thanks Rich On Thu, Sep 29, 2011 at 3:19 PM, Christopher Schultz wrote: > -BEGIN PG

Re: Logging properties of attributes in the HttpSession

2011-09-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rich, On 9/29/2011 12:18 PM, Richard Sayre wrote: > Thanks, I'm trying to log the user name. I am not using Tomcat > for authentication and I need that info in my access logs. So, that means that %u isn't an option, then? :( > Perhaps I will creat

Re: Logging properties of attributes in the HttpSession

2011-09-29 Thread Richard Sayre
Thanks, I'm trying to log the user name. I am not using Tomcat for authentication and I need that info in my access logs. Perhaps I will create a new attribute to hold that value rather than accessing the object I have in session and calling toString. On that note if I know the username, is it

Re: Logging properties of attributes in the HttpSession

2011-09-29 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rich, On 9/29/2011 9:18 AM, Richard Sayre wrote: > I am logging all local host access using the following config: > > directory="logs" prefix="localhost_access_log." suffix=".txt" > pattern='%h %l %u %{userObject}s %t "%r" %s %b' > resolveHosts="f