Code example for LogRecord

Methods: setLoggerNamesetSourceClassNamesetSourceMethodName

0
            buffer.append(": ").append(message);
        } 
        if (type != null) {
            buffer.append(' ').append(Classes.getShortName(type)).append('.');
        } 
        final LogRecord record = new LogRecord(DEBUG_LEVEL, buffer.toString());
        record.setSourceClassName(FactoryRegistry.class.getName());
        record.setSourceMethodName("getServiceProvider");
        record.setLoggerName(LOGGER.getName());
        LOGGER.log(record);
    } 
 
    /** 
     * Searchs the first implementation in the registery matching the specified conditions. 
     * This method is invoked only by the {@link #getServiceProvider(Class, Filter, Hints, 
     * Hints.Key)} public method above; there is no recursivity there. This method do not 
     * creates new instance if no matching factory is found. 
     * 
     * @param  category       The category to look for. Usually an interface class. 
     * @param  implementation The desired class for the implementation, or {@code null} if none.