FYI: http://jakarta.apache.org/log4j/docs/TROUBLESHOOT.html online does not
appear to have been updated.

Thanks for the casting tip. :o)


----- Original Message -----
From: "Ceki Gülcü" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
Sent: Monday, February 11, 2002 1:41 PM
Subject: Re: compile error upgrading from log4j v1.2 alpha 7 to v1.2 beta 2


>
> T Master,
>
> Subsequent to your query, I added the following entry into the
> Troubleshooting guide:
>
> ===================================================================
> Compilation errors when using setLevel(org.apache.log4j.Level) from
> the Category class.
> ===================================================================
>
> If you are getting complaints such as the following from the compiler,
> do not worry there is an easy solution. But first here is the problem
> reported by the compiler:
>
>    [javac] setLevel(org.apache.log4j.Level) in org.apache.log4j.Category
> cannot be applied to (org.apache.log4j.Priority)
>    [javac]         logger.setLevel(Level.DEBUG);
>
> where logger is a variable of type Logger.
>
> Casting any of the Level.DEBUG, Level.INFO, Level.WARN, Level.ERROR,
> Level.FATAL arguments to Level will make the compiler happy. As in
>
>     logger.setLevel((Level) Level.DEBUG);
>
> This cast is always safe because log4j 1.2 will never produce anything
> but Level objects, never Priority objects.
>
> --
> Ceki Gülcü



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to