/** * Delivers the log for the given class or creates a new one if it doesn't exist already. * * @param clazz * The corresponding class. * * @return A logger for the given class. */ public static final Log getLog(final Class<?> clazz) { return LogFactory.getLog(clazz.getName()); }
this.log = LogFactory.getLog(this.getClass().getName() + " (" + this.name + ")");
/** * Used by {@link #getInstance()} to construct the singleton instance. */ private SigarSamplerFactory() { final Log log = LogFactory.getLog(SigarSamplerFactory.class); // access to static logger not possible in constructor final Sigar mySigar = new Sigar(); if (mySigar.getNativeLibrary() == null) { log.error("No Sigar native lib in java.library.path. See Sigar log for details (maybe only visible on Debug log-level)."); } final Humidor humidor = new Humidor(mySigar); this.sigar = humidor.getSigar(); }