All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sql2o.logging.LocalLoggerFactory Maven / Gradle / Ivy

There is a newer version: 1.9.0-RC1
Show newest version
package org.sql2o.logging;

import org.slf4j.LoggerFactory;
import org.sql2o.tools.FeatureDetector;

/**
 * Created by lars on 2/9/14.
 */
public class LocalLoggerFactory {
    // this is thread-safe since static initializer is thread-safe
    private static final boolean slf4jAvailable = FeatureDetector.isSlf4jAvailable();

    public static Logger getLogger(Class clazz) {
        return slf4jAvailable
                ? new Slf4jLogger(LoggerFactory.getLogger(clazz))
                : SysOutLogger.instance;

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy