Mercurial > jhg
comparison src/org/tmatesoft/hg/util/LogFacility.java @ 295:981f9f50bb6c
Issue 11: Error log facility. SessionContext to share common facilities
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 16 Sep 2011 05:35:32 +0200 |
parents | |
children | 909306e412e2 |
comparison
equal
deleted
inserted
replaced
294:32890bab7209 | 295:981f9f50bb6c |
---|---|
1 /* | |
2 * Copyright (c) 2011 TMate Software Ltd | |
3 * | |
4 * This program is free software; you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as published by | |
6 * the Free Software Foundation; version 2 of the License. | |
7 * | |
8 * This program is distributed in the hope that it will be useful, | |
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 * GNU General Public License for more details. | |
12 * | |
13 * For information on how to redistribute this software under | |
14 * the terms of a license other than GNU General Public License | |
15 * contact TMate Software at support@hg4j.com | |
16 */ | |
17 package org.tmatesoft.hg.util; | |
18 | |
19 import org.tmatesoft.hg.internal.Experimental; | |
20 | |
21 /** | |
22 * WORK IN PROGRESS | |
23 * | |
24 * Intention of this class is to abstract away almost any log facility out there clients might be using with the <b>Hg4J</b> library, | |
25 * not to be a full-fledged logging facility of its own. | |
26 * | |
27 * Implementations may wrap platform- or application-specific loggers, e.g. {@link java.util.logging.Logger} or | |
28 * <code>org.eclipse.core.runtime.ILog</code> | |
29 * | |
30 * @author Artem Tikhomirov | |
31 * @author TMate Software Ltd. | |
32 */ | |
33 @Experimental(reason="API might get changed") | |
34 public interface LogFacility { | |
35 | |
36 boolean isDebug(); | |
37 boolean isInfo(); | |
38 | |
39 // src and format never null | |
40 void debug(Class<?> src, String format, Object... args); | |
41 void info(Class<?> src, String format, Object... args); | |
42 void warn(Class<?> src, String format, Object... args); | |
43 void error(Class<?> src, String format, Object... args); | |
44 | |
45 // src shall be non null, either th or message or both | |
46 void debug(Class<?> src, Throwable th, String message); | |
47 void info(Class<?> src, Throwable th, String message); | |
48 void warn(Class<?> src, Throwable th, String message); | |
49 void error(Class<?> src, Throwable th, String message); | |
50 } |