1 /**************************************************************************** 2 * Copyright (c) 2005, 2006, 2007, 2008, 2009 Imola Informatica. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the LGPL License v2.1 5 * which accompanies this distribution, and is available at 6 * http://www.gnu.org/licenses/lgpl.html 7 ****************************************************************************/ 8 9 package it.imolinfo.jbi4corba; 10 11 12 import javax.jbi.component.ComponentContext; 13 import javax.xml.namespace.QName; 14 15 16 /** 17 * The main user interface to logging. It is expected that logging takes place 18 * through concrete implementations of this interface. 19 * <p> 20 * 21 * @author <a href="mailto:mcimatti@imolinfo.it">Marco Cimatti</a> 22 */ 23 public interface Logger { 24 25 void debug(String msg); 26 27 void debug(String string, Object[] object); 28 29 void debug(String errmsg, Object object); 30 31 void debug(String errmsg, Throwable e); 32 33 void debug(String string, Object obj1, Object obj2); 34 35 void error(String msg); 36 37 void error(String string, Object[] args); 38 39 void error(String msg, Throwable ex); 40 41 void error(String msg, Object object); 42 43 void error(String string, Object obj1, Object obj2); 44 45 void info (String msg); 46 47 void info (String string, Object[] args); 48 49 void info (String msg, Throwable ex); 50 51 void info (String msg, Object object); 52 53 void info (String string, Object obj1, Object obj2); 54 55 boolean isDebugEnabled(); 56 57 boolean isInfoEnabled(); 58 59 void warn(String string); 60 61 void warn(String string, Object[] object); 62 63 void warn(String string, Object object); 64 65 void warn(String string, Throwable t); 66 67 void warn(String string, Object obj1, Object obj2); 68 69 70 /** 71 * Log an exception (throwable) at level DEBUG with an accompanying message 72 * according to the specified format and arguments. 73 * <p> 74 * This form avoids superfluous object creation when the logger is disabled 75 * for the DEBUG level. 76 * </p> 77 * 78 * @param format the format string. 79 * @param args the arguments. 80 * @param t the exception (throwable) to log. 81 */ 82 void debug(String format, Object[] args, Throwable t); 83 84 /** 85 * Log an exception (throwable) at level INFO with an accompanying message 86 * according to the specified format and arguments. 87 * <p> 88 * This form avoids superfluous object creation when the logger is disabled 89 * for the INFO level. 90 * </p> 91 * 92 * @param format the format string. 93 * @param args the arguments. 94 * @param t the exception (throwable) to log. 95 */ 96 void info(String format, Object[] args, Throwable t); 97 98 /** 99 * Log an exception (throwable) at level WARN with an accompanying message 100 * according to the specified format and arguments. 101 * <p> 102 * This form avoids superfluous object creation when the logger is disabled 103 * for the WARN level. 104 * </p> 105 * 106 * @param format the format string. 107 * @param args the arguments. 108 * @param t the exception (throwable) to log. 109 */ 110 void warn(String format, Object[] args, Throwable t); 111 112 /** 113 * Log an exception (throwable) at level ERROR with an accompanying message 114 * according to the specified format and arguments. 115 * <p> 116 * This form avoids superfluous object creation when the logger is disabled 117 * for the ERROR level. 118 * </p> 119 * 120 * @param format the format string. 121 * @param args the arguments. 122 * @param t the exception (throwable) to log. 123 */ 124 void error(String format, Object[] args, Throwable t); 125 }