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

org.hibernate.search.util.logging.impl.LoggerInfoStream Maven / Gradle / Ivy

There is a newer version: 5.11.12.Final
Show newest version
/*
 * Hibernate Search, full-text search for your domain model
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.search.util.logging.impl;

import java.io.IOException;

import org.apache.lucene.util.InfoStream;

/**
 * An implementation of {@link org.apache.lucene.util.InfoStream}
 * that redirects output to a logger
 */
public class LoggerInfoStream extends InfoStream {

	private final Log logger = LoggerFactory.make( LogCategory.INFOSTREAM_LOGGER_CATEGORY );

	@Override
	public void message(String component, String message) {
		logger.logInfoStreamMessage( component, message );
	}

	@Override
	public boolean isEnabled(String component) {
		return logger.isTraceEnabled();
	}

	@Override
	public void close() throws IOException { }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy