-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

André,

On 10/29/2009 2:38 PM, André Warnier wrote:
> Christopher Schultz wrote:
>>
>> [Cue Andre's rant about logging configuration in Tomcat 5+]
>>
> Yes, I want a new
> <Valve className="org.apache.catalina.valves.VacuumCleanerLogValve"
>   logpath="mychoice" prefix="mychoicetoo" suffix="mychoicealso"
> rotate="mychoiceagain" />
> that will suck in all the logs that these undisciplined application
> developers dream up and direct all over the place.

I think you can get this effect by:

1. Setting <Context swallowOutput="true"
2. Configure a context logger in logging.properties like this:

   handlers = ...., crappyWebAppHandler
   crappyWebAppHandler.level=FINE
   crappyWebAppHandler.directory=mychoice
   crappyWebAppHandler.prefix=mychoicetoo
   # not sure about suffix

   # Next is all on one line:

org.apache.catalina.code.ContainerBase.[ServiceName].[hostname].[/contextName].handlers=crappyWebAppHandler
   # done with all-on-one-line

I'm not sure if JULI/Tomcat-JULI/whatever supports rotation directly,
but at least it's not using shell-redirection at this point. If you want
to step-into the log4j world (totally worth it!), you can use log4j's
rotation capabilities, which I highly recommend.

> I would even add a couple of additional optional attributes
> blackHole="true"

  crappWebAppHandler.level=SEVERE (or whatever)

> when="rightnow"

Uh... bin/shutdown.sh && sleep 5000 && bin/startup.sh ??

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrqAw8ACgkQ9CaO5/Lv0PDJ/QCfRvxDA5eZL912Mx30a5AouqxQ
wPQAoIYwyUb1T0DHBEzDUj8rX0aKam/T
=4cPA
-----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