001// SECTION-START[License Header]
002// <editor-fold defaultstate="collapsed" desc=" Generated License ">
003/*
004 *   Java Object Management and Configuration
005 *   Copyright (C) Christian Schulte, 2005-206
006 *   All rights reserved.
007 *
008 *   Redistribution and use in source and binary forms, with or without
009 *   modification, are permitted provided that the following conditions
010 *   are met:
011 *
012 *     o Redistributions of source code must retain the above copyright
013 *       notice, this list of conditions and the following disclaimer.
014 *
015 *     o Redistributions in binary form must reproduce the above copyright
016 *       notice, this list of conditions and the following disclaimer in
017 *       the documentation and/or other materials provided with the
018 *       distribution.
019 *
020 *   THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
021 *   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
022 *   AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
023 *   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
024 *   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
025 *   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
026 *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
027 *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
028 *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
029 *   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
030 *
031 *   $JOMC$
032 *
033 */
034// </editor-fold>
035// SECTION-END
036package org.jomc.logging;
037
038// SECTION-START[Documentation]
039// <editor-fold defaultstate="collapsed" desc=" Generated Documentation ">
040/**
041 * Logs events for a specific component.
042 *
043 * <dl>
044 *   <dt><b>Identifier:</b></dt><dd>org.jomc.logging.Logger</dd>
045 *   <dt><b>Multiplicity:</b></dt><dd>One</dd>
046 *   <dt><b>Scope:</b></dt><dd>None</dd>
047 * </dl>
048 *
049 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a> 1.0
050 * @version 1.1
051 * @see org.jomc.ObjectManager#getObject(java.lang.Class) getObject(Logger.class)
052 * @see org.jomc.ObjectManager#getObject(java.lang.Class,java.lang.String) getObject(Logger.class, "<i>implementation name</i>")
053 * @see org.jomc.ObjectManagerFactory
054 */
055// </editor-fold>
056// SECTION-END
057// SECTION-START[Annotations]
058// <editor-fold defaultstate="collapsed" desc=" Generated Annotations ">
059@javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.5", comments = "See http://www.jomc.org/jomc/1.5/jomc-tools-1.5" )
060// </editor-fold>
061// SECTION-END
062public interface Logger
063{
064    // SECTION-START[Logger]
065
066    /**
067     * Gets a flag indicating logging configuration messages is enabled.
068     *
069     * @return {@code true}, if logging configuration messages is enabled; {@code false}, if logging configuration
070     * messages is disabled.
071     *
072     * @since 1.3
073     */
074    boolean isConfigEnabled();
075
076    /**
077     * Logs a configuration message.
078     *
079     * @param message The message to log.
080     *
081     * @since 1.3
082     */
083    void config( String message );
084
085    /**
086     * Logs a configuration exception.
087     *
088     * @param t The exception to log.
089     *
090     * @since 1.3
091     */
092    void config( Throwable t );
093
094    /**
095     * Logs a configuration message and exception.
096     *
097     * @param message The message to log.
098     * @param t The exception to log.
099     *
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}