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: Logger.java 4716 2013-01-03 05:38:09Z schulte $
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.0
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.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
060// </editor-fold>
061// SECTION-END
062public interface Logger
063{
064    // SECTION-START[Logger]
065
066    /**
067     * Gets a flag indicating logging debug messages is enabled.
068     *
069     * @return {@code true}, if logging debug messages is enabled; {@code false}, if logging debug messages is disabled.
070     */
071    boolean isDebugEnabled();
072
073    /**
074     * Logs a debug message.
075     *
076     * @param message The message to log.
077     */
078    void debug( String message );
079
080    /**
081     * Logs a debug exception.
082     *
083     * @param t The exception to log.
084     */
085    void debug( Throwable t );
086
087    /**
088     * Logs a debug message and exception.
089     *
090     * @param message The message to log.
091     * @param t The exception to log.
092     */
093    void debug( String message, Throwable t );
094
095    /**
096     * Gets a flag indicating logging error messages is enabled.
097     *
098     * @return {@code true}, if logging error messages is enabled; {@code false}, if logging error messages is disabled.
099     */
100    boolean isErrorEnabled();
101
102    /**
103     * Logs an error message.
104     *
105     * @param message The message to log.
106     */
107    void error( String message );
108
109    /**
110     * Logs an error exception.
111     *
112     * @param t The exception to log.
113     */
114    void error( Throwable t );
115
116    /**
117     * Logs an error message and exception.
118     *
119     * @param message The message to log.
120     * @param t The exception to log.
121     */
122    void error( String message, Throwable t );
123
124    /**
125     * Gets a flag indicating logging fatal messages is enabled.
126     *
127     * @return {@code true}, if logging fatal messages is enabled; {@code false}, if logging fatal messages is disabled.
128     */
129    boolean isFatalEnabled();
130
131    /**
132     * Logs a fatal message.
133     *
134     * @param message The message to log.
135     */
136    void fatal( String message );
137
138    /**
139     * Logs a fatal exception.
140     *
141     * @param t The exception to log.
142     */
143    void fatal( Throwable t );
144
145    /**
146     * Logs a fatal message and exception.
147     *
148     * @param message The message to log.
149     * @param t The exception to log.
150     */
151    void fatal( String message, Throwable t );
152
153    /**
154     * Gets a flag indicating logging info messages is enabled.
155     *
156     * @return {@code true}, if logging info messages is enabled; {@code false}, if logging info messages is disabled.
157     */
158    boolean isInfoEnabled();
159
160    /**
161     * Logs an info message.
162     *
163     * @param message The message to log.
164     */
165    void info( String message );
166
167    /**
168     * Logs an info exception.
169     *
170     * @param t The exception to log.
171     */
172    void info( Throwable t );
173
174    /**
175     * Logs an info message and exception.
176     *
177     * @param message The message to log.
178     * @param t The exception to log.
179     */
180    void info( String message, Throwable t );
181
182    /**
183     * Gets a flag indicating logging trace messages is enabled.
184     *
185     * @return {@code true}, if logging trace messages is enabled; {@code false}, if logging trace messages is disabled.
186     */
187    boolean isTraceEnabled();
188
189    /**
190     * Logs a trace message.
191     *
192     * @param message The message to log.
193     */
194    void trace( String message );
195
196    /**
197     * Logs a trace exception.
198     *
199     * @param t The exception to log.
200     */
201    void trace( Throwable t );
202
203    /**
204     * Logs a trace message and exception.
205     *
206     * @param message The message to log.
207     * @param t The exception to log.
208     */
209    void trace( String message, Throwable t );
210
211    /**
212     * Gets a flag indicating logging warning messages is enabled.
213     *
214     * @return {@code true}, if logging warning messages is enabled; {@code false}, if logging warning messages is
215     * disabled.
216     */
217    boolean isWarnEnabled();
218
219    /**
220     * Logs a warning message.
221     *
222     * @param message The message to log.
223     */
224    void warn( String message );
225
226    /**
227     * Logs a warning exception.
228     *
229     * @param t The exception to log.
230     */
231    void warn( Throwable t );
232
233    /**
234     * Logs a warning message and exception.
235     *
236     * @param message The message to log.
237     * @param t The exception to log.
238     */
239    void warn( String message, Throwable t );
240
241    // SECTION-END
242}