You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jason Guild <ja...@alaska.gov> on 2023/08/22 18:53:58 UTC

overriding application log configuration at the container level

Hi All:

I have a web application MYAPP which embeds its logging configuration in 
WEB-INF/classes/logging.properties.
I'd like to see more detailed logging when running the application 
inside my IDE without making any temporary changes to this file.

The logging.properties which is embedded into the WAR sets a log level 
for the application and also a package namespace like this:
> .level = WARNING
>
> my.package.level = INFO

I have tried, to no avail, to adjust these levels in my development 
container using settings like:
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/MYAPP].level 
> = ALL
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/MYAPP].my.package.level 
> = ALL

Is it possible to override application log levels at the container level 
in $CATALINA_BASE/conf/logging.properties?

Thank you,
Jason


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


Re: overriding application log configuration at the container level

Posted by Mark Thomas <ma...@apache.org>.
On 22/08/2023 11:53, Jason Guild wrote:
> Hi All:
> 
> I have a web application MYAPP which embeds its logging configuration in 
> WEB-INF/classes/logging.properties.
> I'd like to see more detailed logging when running the application 
> inside my IDE without making any temporary changes to this file.
> 
> The logging.properties which is embedded into the WAR sets a log level 
> for the application and also a package namespace like this:
>> .level = WARNING
>>
>> my.package.level = INFO
> 
> I have tried, to no avail, to adjust these levels in my development 
> container using settings like:
>> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/MYAPP].level = ALL
>> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/MYAPP].my.package.level = ALL
> 
> Is it possible to override application log levels at the container level 
> in $CATALINA_BASE/conf/logging.properties?

Based on a quick review of the readConfiguration() methods in 
org.apache.juli.ClassLoaderLogManager the answer to that quesiton is no.

One option might be to edit the log level via JMX.

Mart

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