/*!
  @header ECLoggingConfiguration
  @abstract Module of Encore
 
  @availability OS X, GNUstep
  @copyright 2004, 2005, 2006 Oliver Langer

  Author: Oliver Langer

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA

  <pre>
  -------------------------------------------------------------------------
  Modification history

  03.02.06 ola     initial version
  22.08.06 ola     license changed
  -------------------------------------------------------------------------
  </pre>
*/

#if !defined(__ECLoggingConfiguration_H)
#define __ECLoggingConfiguration_H

#include <Foundation/Foundation.h>
#include <Encore/ECObject.h>
#include <Encore/ECLoggingFormatter.h>
#include <Encore/ECLoggingWriter.h>
#include <Encore/ECLogger.h>

/*!
 * @class ECLoggingConfiguration
 * @abstract An ECLoggingConfiguration groups
 * <ul>
 *   <li>logging level</li>
 *   <li>logging formatter</li>
 *   <li>logging writer</li>
 * </ul>
 * and has a name assigned to itself.
 */
@interface ECLoggingConfiguration : ECObject {
  @private
    id <ECLoggingFormatter> loggingFormatter;
    id <ECLoggingWriter>    loggingWriter;
    ECLoggingLevel          loggingLevel;
    ECLogger                *logger;
}

- init;
- (void) dealloc;

/*!
 * @method logger
 * @abstract After complete initialization of this instance this method
 *   may be called in order to get a corresponding ECLogger instance which is
 *   ready for logging then.
 * @result ECLogger instance which may be used for logging
 */
- (ECLogger *) logger;


/*!
 * @method loggingFormatter
 * @result returns the currently set logging formatter
 */
- (id <ECLoggingFormatter>) loggingFormatter;


/*!
 * @method  loggingWriter
 * @result the loggingWriter currently being used
 */
- (id <ECLoggingWriter>) loggingWriter;


/*!
 * @method setLoggingFormatter
 * @result self
 * @param aLogingFormatter logging formatter to use
 * @abstract sets the logging formatter. The default logging
 *   formatter {@link ECDefaultLoggingFormatter} is being used until this
 *   method is called
 */
- setLoggingFormatter: (id <ECLoggingFormatter>) aLogingFormatter;


/*!
 * @method setLoggingLevel
 * @abstract Used to specify the level used for logging
 * @param level may only be equal to one of the following values
 *   (case-insensitive):
 *   <ul>
 *     <li>DEBUG</li>
 *     <li>INFO</li>
 *     <li>TRACE</li>
 *     <li>WARN</li>
 *     <li>ERROR</li>
 *     <li>CRITICAL</li>
 *     <li>FATAL</li>
 *   </ul>
 * @result self
 */
- setLoggingLevel: (NSString *) level;


/*!
 * @method setLoggingWriter
 * @abstract A logging writer is used to output the log entries which have
 *   been previously formatted. This method is used to set the corresponding
 *   instance.
 * @param aLoggingWriter loggingWriter to use
 * @result self
 */
- setLoggingWriter: (id <ECLoggingWriter>) aLoggingWriter;
@end

#endif
