I am +1 on this commit. Other comments?
"David S. Faller" <[EMAIL PROTECTED]> writes:
[snip]
> I would prefer a 'dynamic' method,too. Otherwise it would be necessary to
> recompile your code, if you want to see the debug messages.
>
> What about this?
>
>
> --- Logger.java 2001/04/12 02:22:58 1.9
> +++ Logger.java 2001/06/07 12:15:03
> @@ -151,6 +151,26 @@
> public void setLogLevel(int level);
>
> /**
> + * Checks if DEBUG statements are enabled.
> + */
> + public boolean isDebugEnabled();
> +
> + /**
> + * Checks if INFO statements are enabled.
> + */
> + public boolean isInfoEnabled();
> +
> + /**
> + * Checks if WARN statements are enabled.
> + */
> + public boolean isWarnEnabled();
> +
> + /**
> + * Checks if ERROR statements are enabled.
> + */
> + public boolean isErrorEnabled();
> +
> + /**
> * This method should be implemented by user.
> * It performs action that are need for deterimne whether
> * logger was well configured or has any output
>
>
>
> --- BaseLogger.java 2001/04/06 18:41:51 1.9
> +++ BaseLogger.java 2001/06/07 12:27:11
> @@ -222,6 +222,38 @@
> }
> /**
> + * Checks if DEBUG statements are enabled.
> + */
> + public boolean isDebugEnabled()
> + {
> + return (logLevel == DEBUG);
> + }
> +
> + /**
> + * Checks if INFO statements are enabled.
> + */
> + public boolean isInfoEnabled()
> + {
> + return (logLevel <= INFO);
> + }
> +
> + /**
> + * Checks if WARN statements are enabled.
> + */
> + public boolean isWarnEnabled()
> + {
> + return (logLevel <= WARN);
> + }
> +
> + /**
> + * Checks if ERROR statements are enabled.
> + */
> + public boolean isErrorEnabled()
> + {
> + return (logLevel <= ERROR);
> + }
> +
> + /**
> * This method should be implemented by user if the logger can handle
> files.
> * It adds local file as destinations for logger.
> *
>
> cya,
> David
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]