class LoggerFactory {

    public static Logger getLogger(String name) {
        try {
            Object logInstance = ClassUtils.forName(implClass, Logger.class.getClassLoader())
                .getConstructor(String.class)
                .newInstance(name);
            if (logInstance instanceof Logger) {
                return (Logger) logInstance;
            } else {
                throw new SofaRpcRuntimeException(implClass + " is not type of  " + Logger.class);
            }
        } catch (SofaRpcRuntimeException ex) {
            throw ex;
        } catch (Exception e) {
            throw new SofaRpcRuntimeException("Error when getLogger of " + name
                + ", implement is " + implClass + "", e);
        }
    }

}