You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rob Sargent <rs...@xmission.com> on 2021/12/01 19:24:08 UTC

servletcontext.log filename

I'm using an embedded tomcat (ver9.0.54) and I don't see how to 
name/redirect the output of ServletContext.log(String).

I see in the manual

    This logging is performed according to the Tomcat logging
    configuration. You cannot overwrite it in a web application.

I missing the "Tomcat logging config" bit, I guess.



Re: servletcontext.log filename

Posted by Rob Sargent <rs...@xmission.com>.

On 12/1/21 12:32 PM, Mark Thomas wrote:
> On 01/12/2021 19:24, Rob Sargent wrote:
>> I'm using an embedded tomcat (ver9.0.54) and I don't see how to 
>> name/redirect the output of ServletContext.log(String).
>>
>> I see in the manual
>>
>>     This logging is performed according to the Tomcat logging
>>     configuration. You cannot overwrite it in a web application.
>>
>> I missing the "Tomcat logging config" bit, I guess.
>
> Each web application gets its own logger and these messages are 
> directed there. The loggers are named along these lines:
>
>
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples]
>
> Adjust as necessary for your engine name, host name and context path.
>
> Mark
>

I'm sorry, but my servlet calls to log("something") seem to be going to 
/dev/null.  I can't find them anywhere.  I'm operating on a CentOS 7 not 
under my management (so no IDE to look at the values of interest).


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


Re: servletcontext.log filename

Posted by Rob Sargent <rs...@xmission.com>.

On 12/1/21 12:32 PM, Mark Thomas wrote:
> On 01/12/2021 19:24, Rob Sargent wrote:
>> I'm using an embedded tomcat (ver9.0.54) and I don't see how to 
>> name/redirect the output of ServletContext.log(String).
>>
>> I see in the manual
>>
>>     This logging is performed according to the Tomcat logging
>>     configuration. You cannot overwrite it in a web application.
>>
>> I missing the "Tomcat logging config" bit, I guess.
>
> Each web application gets its own logger and these messages are 
> directed there. The loggers are named along these lines:
>
>
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples]
>
> Adjust as necessary for your engine name, host name and context path.
>
> Mark
>
Call off the dogs: I found the logs (carefully hidden in stdout...)

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


Re: servletcontext.log filename

Posted by Mark Thomas <ma...@apache.org>.
On 01/12/2021 19:24, Rob Sargent wrote:
> I'm using an embedded tomcat (ver9.0.54) and I don't see how to 
> name/redirect the output of ServletContext.log(String).
> 
> I see in the manual
> 
>     This logging is performed according to the Tomcat logging
>     configuration. You cannot overwrite it in a web application.
> 
> I missing the "Tomcat logging config" bit, I guess.

Each web application gets its own logger and these messages are directed 
there. The loggers are named along these lines:


org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples]

Adjust as necessary for your engine name, host name and context path.

Mark

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