1 // SECTION-START[License Header] 2 // <editor-fold defaultstate="collapsed" desc=" Generated License "> 3 /* 4 * Java Object Management and Configuration 5 * Copyright (C) Christian Schulte, 2005-206 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 12 * o Redistributions of source code must retain the above copyright 13 * notice, this list of conditions and the following disclaimer. 14 * 15 * o Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in 17 * the documentation and/or other materials provided with the 18 * distribution. 19 * 20 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 21 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 22 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 23 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * 31 * $JOMC$ 32 * 33 */ 34 // </editor-fold> 35 // SECTION-END 36 package org.jomc.logging; 37 38 // SECTION-START[Documentation] 39 // <editor-fold defaultstate="collapsed" desc=" Generated Documentation "> 40 /** 41 * Logs events for a specific component. 42 * 43 * <dl> 44 * <dt><b>Identifier:</b></dt><dd>org.jomc.logging.Logger</dd> 45 * <dt><b>Multiplicity:</b></dt><dd>One</dd> 46 * <dt><b>Scope:</b></dt><dd>None</dd> 47 * </dl> 48 * 49 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a> 1.0 50 * @version 1.1 51 * @see org.jomc.ObjectManager#getObject(java.lang.Class) getObject(Logger.class) 52 * @see org.jomc.ObjectManager#getObject(java.lang.Class,java.lang.String) getObject(Logger.class, "<i>implementation name</i>") 53 * @see org.jomc.ObjectManagerFactory 54 */ 55 // </editor-fold> 56 // SECTION-END 57 // SECTION-START[Annotations] 58 // <editor-fold defaultstate="collapsed" desc=" Generated Annotations "> 59 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" ) 60 // </editor-fold> 61 // SECTION-END 62 public interface Logger 63 { 64 // SECTION-START[Logger] 65 66 /** 67 * Gets a flag indicating logging configuration messages is enabled. 68 * 69 * @return {@code true}, if logging configuration messages is enabled; {@code false}, if logging configuration 70 * messages is disabled. 71 * 72 * @since 1.3 73 */ 74 boolean isConfigEnabled(); 75 76 /** 77 * Logs a configuration message. 78 * 79 * @param message The message to log. 80 * 81 * @since 1.3 82 */ 83 void config( String message ); 84 85 /** 86 * Logs a configuration exception. 87 * 88 * @param t The exception to log. 89 * 90 * @since 1.3 91 */ 92 void config( Throwable t ); 93 94 /** 95 * Logs a configuration message and exception. 96 * 97 * @param message The message to log. 98 * @param t The exception to log. 99 * 100 * @since 1.3 101 */ 102 void config( String message, Throwable t ); 103 104 /** 105 * Gets a flag indicating logging debug messages is enabled. 106 * 107 * @return {@code true}, if logging debug messages is enabled; {@code false}, if logging debug messages is disabled. 108 */ 109 boolean isDebugEnabled(); 110 111 /** 112 * Logs a debug message. 113 * 114 * @param message The message to log. 115 */ 116 void debug( String message ); 117 118 /** 119 * Logs a debug exception. 120 * 121 * @param t The exception to log. 122 */ 123 void debug( Throwable t ); 124 125 /** 126 * Logs a debug message and exception. 127 * 128 * @param message The message to log. 129 * @param t The exception to log. 130 */ 131 void debug( String message, Throwable t ); 132 133 /** 134 * Gets a flag indicating logging error messages is enabled. 135 * 136 * @return {@code true}, if logging error messages is enabled; {@code false}, if logging error messages is disabled. 137 */ 138 boolean isErrorEnabled(); 139 140 /** 141 * Logs an error message. 142 * 143 * @param message The message to log. 144 */ 145 void error( String message ); 146 147 /** 148 * Logs an error exception. 149 * 150 * @param t The exception to log. 151 */ 152 void error( Throwable t ); 153 154 /** 155 * Logs an error message and exception. 156 * 157 * @param message The message to log. 158 * @param t The exception to log. 159 */ 160 void error( String message, Throwable t ); 161 162 /** 163 * Gets a flag indicating logging fatal messages is enabled. 164 * 165 * @return {@code true}, if logging fatal messages is enabled; {@code false}, if logging fatal messages is disabled. 166 */ 167 boolean isFatalEnabled(); 168 169 /** 170 * Logs a fatal message. 171 * 172 * @param message The message to log. 173 */ 174 void fatal( String message ); 175 176 /** 177 * Logs a fatal exception. 178 * 179 * @param t The exception to log. 180 */ 181 void fatal( Throwable t ); 182 183 /** 184 * Logs a fatal message and exception. 185 * 186 * @param message The message to log. 187 * @param t The exception to log. 188 */ 189 void fatal( String message, Throwable t ); 190 191 /** 192 * Gets a flag indicating logging info messages is enabled. 193 * 194 * @return {@code true}, if logging info messages is enabled; {@code false}, if logging info messages is disabled. 195 */ 196 boolean isInfoEnabled(); 197 198 /** 199 * Logs an info message. 200 * 201 * @param message The message to log. 202 */ 203 void info( String message ); 204 205 /** 206 * Logs an info exception. 207 * 208 * @param t The exception to log. 209 */ 210 void info( Throwable t ); 211 212 /** 213 * Logs an info message and exception. 214 * 215 * @param message The message to log. 216 * @param t The exception to log. 217 */ 218 void info( String message, Throwable t ); 219 220 /** 221 * Gets a flag indicating logging trace messages is enabled. 222 * 223 * @return {@code true}, if logging trace messages is enabled; {@code false}, if logging trace messages is disabled. 224 */ 225 boolean isTraceEnabled(); 226 227 /** 228 * Logs a trace message. 229 * 230 * @param message The message to log. 231 */ 232 void trace( String message ); 233 234 /** 235 * Logs a trace exception. 236 * 237 * @param t The exception to log. 238 */ 239 void trace( Throwable t ); 240 241 /** 242 * Logs a trace message and exception. 243 * 244 * @param message The message to log. 245 * @param t The exception to log. 246 */ 247 void trace( String message, Throwable t ); 248 249 /** 250 * Gets a flag indicating logging warning messages is enabled. 251 * 252 * @return {@code true}, if logging warning messages is enabled; {@code false}, if logging warning messages is 253 * disabled. 254 */ 255 boolean isWarnEnabled(); 256 257 /** 258 * Logs a warning message. 259 * 260 * @param message The message to log. 261 */ 262 void warn( String message ); 263 264 /** 265 * Logs a warning exception. 266 * 267 * @param t The exception to log. 268 */ 269 void warn( Throwable t ); 270 271 /** 272 * Logs a warning message and exception. 273 * 274 * @param message The message to log. 275 * @param t The exception to log. 276 */ 277 void warn( String message, Throwable t ); 278 279 // SECTION-END 280 }