The behavior of org.eclipse.jetty.util.log.DEBUG is consistent with all of
the other logging layers Jetty supports.
Its set to enable DEBUG for the lifetime of the VM.

Don't use that System property if you want to adjust levels at runtime.

Joakim Erdfelt / [email protected]

On Fri, Feb 5, 2016 at 7:41 AM, Lothar Kimmeringer <[email protected]>
wrote:

> Hi,
>
> I think that there is a bug in JavaUtilLog:
>
> public class JavaUtilLog extends AbstractLogger
> [...]
>     public JavaUtilLog(String name)
>     {
>         _logger = java.util.logging.Logger.getLogger(name);
>         if
> (Boolean.parseBoolean(Log.__props.getProperty("org.eclipse.jetty.util.log.DEBUG",
> "false")))
>         {
>             _logger.setLevel(Level.FINE);
>         }
>         configuredLevel = _logger.getLevel();
>     }
> [...]
>     public void setDebugEnabled(boolean enabled)
>     {
>         if (enabled)
>         {
>             configuredLevel = _logger.getLevel();
>             _logger.setLevel(Level.FINE);
>         }
>         else
>         {
>             _logger.setLevel(configuredLevel);
>         }
>     }
> [...]
> }
>
> I think configuredLevel should be instantiated before
> the system property is evaluated. With the system-
> property being set it's impossible to return to
> non-debug-logging during runtime.
>
>
> Thanks and cheers, Lothar
> _______________________________________________
> jetty-users mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to