tikhomirov@295: /* tikhomirov@295: * Copyright (c) 2011 TMate Software Ltd tikhomirov@295: * tikhomirov@295: * This program is free software; you can redistribute it and/or modify tikhomirov@295: * it under the terms of the GNU General Public License as published by tikhomirov@295: * the Free Software Foundation; version 2 of the License. tikhomirov@295: * tikhomirov@295: * This program is distributed in the hope that it will be useful, tikhomirov@295: * but WITHOUT ANY WARRANTY; without even the implied warranty of tikhomirov@295: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the tikhomirov@295: * GNU General Public License for more details. tikhomirov@295: * tikhomirov@295: * For information on how to redistribute this software under tikhomirov@295: * the terms of a license other than GNU General Public License tikhomirov@295: * contact TMate Software at support@hg4j.com tikhomirov@295: */ tikhomirov@295: package org.tmatesoft.hg.util; tikhomirov@295: tikhomirov@295: import org.tmatesoft.hg.internal.Experimental; tikhomirov@295: tikhomirov@295: /** tikhomirov@295: * WORK IN PROGRESS tikhomirov@295: * tikhomirov@295: * Intention of this class is to abstract away almost any log facility out there clients might be using with the Hg4J library, tikhomirov@295: * not to be a full-fledged logging facility of its own. tikhomirov@295: * tikhomirov@295: * Implementations may wrap platform- or application-specific loggers, e.g. {@link java.util.logging.Logger} or tikhomirov@295: * org.eclipse.core.runtime.ILog tikhomirov@295: * tikhomirov@295: * @author Artem Tikhomirov tikhomirov@295: * @author TMate Software Ltd. tikhomirov@295: */ tikhomirov@295: @Experimental(reason="API might get changed") tikhomirov@295: public interface LogFacility { tikhomirov@295: tikhomirov@295: boolean isDebug(); tikhomirov@295: boolean isInfo(); tikhomirov@295: tikhomirov@295: // src and format never null tikhomirov@295: void debug(Class src, String format, Object... args); tikhomirov@295: void info(Class src, String format, Object... args); tikhomirov@295: void warn(Class src, String format, Object... args); tikhomirov@295: void error(Class src, String format, Object... args); tikhomirov@295: tikhomirov@295: // src shall be non null, either th or message or both tikhomirov@295: void debug(Class src, Throwable th, String message); tikhomirov@295: void info(Class src, Throwable th, String message); tikhomirov@295: void warn(Class src, Throwable th, String message); tikhomirov@295: void error(Class src, Throwable th, String message); tikhomirov@295: }