Hi Christopher*
*
Thank you for your response.

*By "write some data in an object" I wanted to say that, when the logs are
written, *
*then and there I would like to have the same information encapsulated in an
object*
because we need to send it to our framework.

Another option would be analyzing
the logs and extracting the info. But I thought it might be a bit easier to
get it in
some object.

I will either modify the AccessValveLog class or just extend it to meet our
requirements.

by the way, I could not find META-INF/context.xml. I create from scratch ?

Also, if I put the <Valve className="my.Valve">...........code in the
server.xml of Tomcat, would'nt it work just like AccessLogValve ??

Thanks once again,

Cheers
*
*
On Wed, Jun 24, 2009 at 11:39 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Sumit,
>
> On 6/24/2009 10:48 AM, Sumit D wrote:
> > Hello All!I am trying to edit the AccessLogValve and then would
> > rename it to some other Valve. Presently, the AccessLogValve writes
> > logs, but I would like to write the same data in an object as well.
> > Any pointers on how can I achieve this ?? I might be able to add some
> > code where it writes to logs, so that it will also write to some
> > object.
>
> What do you mean when you say "write some data in an object"?
>
> > But then I have no idea how to Deploy this custom valve.
>
> Deploying the valve is easy:
>
> 1. Compile it to .class file(s)
> 2. JAR your .class files into a .jar file
> 3. Put your .jar file into $CATALINA_HOME/lib
> 4. Add a <Valve className="my.Valve"> element to your <Context>
>   element in META-INF/context.xml in your webapp
>
> > Also, Valve Component specifies that the log "pattern" supports many
> > things like %h, %l, etc but so far, i could not find how can I
> > include all those(pattern codes) in the log file.
>
> You'll just have to read the code. Start with the "createLogElements"
> method and read everything it calls. It's pretty straightforward.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkpCnQYACgkQ9CaO5/Lv0PA0nQCfZI5xk3HHQTPMTQCQGdckX6Y7
> a7gAn0gSUe1mAmtVQmM5N8JNzaovpUny
> =68qu
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to