You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Clément Guillaume <cg...@hotpads.com> on 2018/04/05 03:02:15 UTC

DirectJDKLog overriding formatter

Hi,

I was wondering why DirectJDKLog was overriding the Formatter of the
Console appender when the default java logging.properties file was used.

I see that this is documented at
https://tomcat.apache.org/tomcat-9.0-doc/config/systemprops.html#Logging
but I would prefer to configure the logging with the file rather that with
system property.

I see that this have been in tomcats for ages
http://fisheye.apache.org:8060/changelog/tomcat?cs=329053

Thank you.

PS: also wondered what was DirectJDKLog.SIMPLE_CFG for

Re: DirectJDKLog overriding formatter

Posted by Clément Guillaume <cg...@hotpads.com>.
I suggest to get rid all this feature (and all the static block at the top
of DirectJDKLog) because

- if a user can't use system properties, he can't set the logging config
file location and can't configure the console formatter overrider
- if a user is setting the console formatter overrider (System property
org.apache.juli.formatter), he has control over the system properties and
so can configure the logging config file and have full control of the
configuration
- this should affect only few cases because most of the setups are using
the logging.properties that ships with tomcat
- java.util.logging.SimpleFormatter, the formatter that DirectJDKLog is
setting, is now the default formatter in the logging.properties that ships
with java

On Fri, Apr 6, 2018 at 5:27 AM, Mark Thomas <ma...@apache.org> wrote:

> On 05/04/18 04:02, Clément Guillaume wrote:
> > Hi,
> >
> > I was wondering why DirectJDKLog was overriding the Formatter of the
> > Console appender when the default java logging.properties file was used.
>
> Because the developer who wrote it <quote>couldn't stand</quote> the
> default provided by the JRE.
>
> > I see that this is documented at
> > https://tomcat.apache.org/tomcat-9.0-doc/config/systemprops.html#Logging
> > but I would prefer to configure the logging with the file rather that
> with
> > system property.
>
> There is an example of how to do this in the logging.properties that
> ships with Tomcat.
>
> > I see that this have been in tomcats for ages
> > http://fisheye.apache.org:8060/changelog/tomcat?cs=329053
> >
> > Thank you.
> >
> > PS: also wondered what was DirectJDKLog.SIMPLE_CFG for
>
> Cruft that should have been removed a long time ago.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: DirectJDKLog overriding formatter

Posted by Mark Thomas <ma...@apache.org>.
On 05/04/18 04:02, Clément Guillaume wrote:
> Hi,
> 
> I was wondering why DirectJDKLog was overriding the Formatter of the
> Console appender when the default java logging.properties file was used.

Because the developer who wrote it <quote>couldn't stand</quote> the
default provided by the JRE.

> I see that this is documented at
> https://tomcat.apache.org/tomcat-9.0-doc/config/systemprops.html#Logging
> but I would prefer to configure the logging with the file rather that with
> system property.

There is an example of how to do this in the logging.properties that
ships with Tomcat.

> I see that this have been in tomcats for ages
> http://fisheye.apache.org:8060/changelog/tomcat?cs=329053
> 
> Thank you.
> 
> PS: also wondered what was DirectJDKLog.SIMPLE_CFG for

Cruft that should have been removed a long time ago.

Mark

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