You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jonathan Mast <jh...@gmail.com> on 2008/06/03 20:27:54 UTC

Context level logging

OK, i have a webapp which has it's own context element.  I want all the
System.out and System.err stuff from this webapp to go to it's own special
log file as opposed to catalina.out.  My reading of the Tomcat docs (version
5.5) seems to indicate that I can do this by following these steps:

1. set the "swallowOutput" attribute to true in the Context entry in
server.xml
2. add the following to the "logging.properties" file:

    6FOOAPP.org.apache.juli.FileHandler

    6FOOAPP.org.apache.juli.FileHandler.level = FINE
    6FOOAPP.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
    6FOOAPP.org.apache.juli.FileHandler.prefix = FOOAPP.


org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FOOAPP].level
= FINE

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FOOAPP].handlers
= 6FOOAPP.org.apache.juli.FileHandler

3. restart Tomcat

Is this correct?

The last 2 lines of the edit I really don't understand.

thanks

Re: Context level logging

Posted by Jonathan Mast <jh...@gmail.com>.
Well I did everything I said I would above and Catalina.out kept on
receiving the System errors and the specified file didn't receive anything.
So I guess it was a failure.

I do believe you can specify in the web app deployment descriptor more
detailed logging, but I haven't had time to test it out.

Sorry I couldn't help ya out more.

Good luck

On Mon, Nov 10, 2008 at 10:30 AM, blacksheep <eg...@gmail.com> wrote:

>
> I wonder you came up with a solution ?
>
>
> Jonathan Mast-2 wrote:
> >
> > OK, i have a webapp which has it's own context element.  I want all the
> > System.out and System.err stuff from this webapp to go to it's own
> special
> > log file as opposed to catalina.out.  My reading of the Tomcat docs
> > (version
> > 5.5) seems to indicate that I can do this by following these steps:
> >
> > 1. set the "swallowOutput" attribute to true in the Context entry in
> > server.xml
> > 2. add the following to the "logging.properties" file:
> >
> >     6FOOAPP.org.apache.juli.FileHandler
> >
> >     6FOOAPP.org.apache.juli.FileHandler.level = FINE
> >     6FOOAPP.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
> >     6FOOAPP.org.apache.juli.FileHandler.prefix = FOOAPP.
> >
> >
> >
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FOOAPP].level
> > = FINE
> >
> >
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FOOAPP].handlers
> > = 6FOOAPP.org.apache.juli.FileHandler
> >
> > 3. restart Tomcat
> >
> > Is this correct?
> >
> > The last 2 lines of the edit I really don't understand.
> >
> > thanks
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Context-level-logging-tp17630343p20422122.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Context level logging

Posted by blacksheep <eg...@gmail.com>.
I wonder you came up with a solution ?
 

Jonathan Mast-2 wrote:
> 
> OK, i have a webapp which has it's own context element.  I want all the
> System.out and System.err stuff from this webapp to go to it's own special
> log file as opposed to catalina.out.  My reading of the Tomcat docs
> (version
> 5.5) seems to indicate that I can do this by following these steps:
> 
> 1. set the "swallowOutput" attribute to true in the Context entry in
> server.xml
> 2. add the following to the "logging.properties" file:
> 
>     6FOOAPP.org.apache.juli.FileHandler
> 
>     6FOOAPP.org.apache.juli.FileHandler.level = FINE
>     6FOOAPP.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
>     6FOOAPP.org.apache.juli.FileHandler.prefix = FOOAPP.
> 
> 
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FOOAPP].level
> = FINE
> 
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FOOAPP].handlers
> = 6FOOAPP.org.apache.juli.FileHandler
> 
> 3. restart Tomcat
> 
> Is this correct?
> 
> The last 2 lines of the edit I really don't understand.
> 
> thanks
> 
> 

-- 
View this message in context: http://www.nabble.com/Context-level-logging-tp17630343p20422122.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org