Code example for Logger

Methods: info, isLoggable, warning

0
        try { 
             
            String cn = GlobalProperties.get("ebean.classpathreader", null);
            if (cn != null){
                // use a user defined classPathReader 
                logger.info("Using ["+cn+"] to read the searchable class path");
                classPathReader = (ClassPathReader)ClassUtil.newInstance(cn, this.getClass());
            } 
             
            classPaths = classPathReader.readPath(classLoader);
                 
            if (classPaths == null || classPaths.length == 0){
                String msg = "ClassPath is EMPTY using ClassPathReader ["+classPathReader+"]";
                logger.warning(msg);
            } 
             
            boolean debug = GlobalProperties.getBoolean("ebean.debug.classpath", false);
            if (debug || logger.isLoggable(Level.FINER)) {
                String msg = "Classpath " + Arrays.toString(classPaths);
                logger.info(msg);
            } 
             
        } catch (Exception e) {
            String msg = "Error trying to read the classpath entries";
            throw new RuntimeException(msg, e);