Question.  Is the user trying to determine if a Logger exists or if the 
configuration for that logger name exists?   IOW - what is the point of 
querying whether a Logger exists or not - the implication is you are going to 
do some more testing against it.  If they want to determine the configuration 
for a logger that can’t be done through the API.


Ralph


On Mar 24, 2014, at 12:53 PM, Gary Gregory <[email protected]> wrote:

> Hi All:
> 
> In v1.2 we have:
> 
> LogManager.exists(String)
> 
> Which can be implemented as a convenience method in 2.0 as:
> 
>     /**
>      * Detects if a Logger with the specified name exists. Convenience method 
> for porting from version 1.
>      * @param name The Logger name to search for.
>      * @return true if the Logger exists, false otherwise.
>      * @see LoggerContext#hasLogger(String)
>      */
>     public static boolean exists(String name) {
>         return getContext().hasLogger(name);
>     }
> 
> I am not crazy about continuing the use of the "exists" name when "hasLogger" 
> is clearer IMO.
> 
> Choices:
> 1- Add LogManager.exists(String), the easiest for porting.
> 2- Add LogManager.hasLogger(String), the nicest
> 3- Use LogManager.getContext().hasLogger(String), the ugliest.
> 4- Other
> 
> I am leaning for 2.
> 
> Thoughts?
> 
> Gary
> 
> -- 
> E-Mail: [email protected] | [email protected] 
> Java Persistence with Hibernate, Second Edition
> JUnit in Action, Second Edition
> Spring Batch in Action
> Blog: http://garygregory.wordpress.com 
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

Reply via email to