#region Apache Notice
/*****************************************************************************
* $Header: $
* $Revision$
* $Date$
*
* iBATIS.NET Data Mapper
* Copyright (C) 2004 - Gilles Bayon
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
********************************************************************************/
#endregion
using System;
namespace IBatisNet.Common.Logging
{
///
/// The 7 logging levels used by Log are (in order):
///
public enum LogLevel
{
///
///
///
All = 0,
///
///
///
Debug = 1,
///
///
///
Info = 2,
///
///
///
Warn = 3,
///
///
///
Error = 4,
///
///
///
Fatal = 5,
///
/// Do not log anything.
///
Off = 6,
}
///
/// A simple logging interface abstracting logging APIs. Inspired by log4net.
///
public interface ILog
{
///
/// Log a message object with the level.
///
/// The message object to log.
void Debug( object message );
///
/// Log a message object with the level including
/// the stack trace of the passed
/// as a parameter.
///
/// The message object to log.
/// The exception to log, including its stack trace.
void Debug( object message, Exception exception );
// ///
// /// Logs a formatted message string with the level.
// ///
// /// A String containing zero or more format items
// /// An Object array containing zero or more objects to format
// void DebugFormat(string format, params object[] args);
//
// ///
// /// Logs a formatted message string with the level.
// ///
// /// An that supplies culture-specific formatting information
// /// A String containing zero or more format items
// /// An Object array containing zero or more objects to format
// void DebugFormat(IFormatProvider provider, string format, params object[] args);
///
/// Log a message object with the level.
///
/// The message object to log.
void Error( object message );
///
/// Log a message object with the level including
/// the stack trace of the passed
/// as a parameter.
///
/// The message object to log.
/// The exception to log, including its stack trace.
void Error( object message, Exception exception );
// ///
// /// Logs a formatted message string with the level.
// ///
// /// A String containing zero or more format items
// /// An Object array containing zero or more objects to format
// void ErrorFormat(string format, params object[] args);
//
// ///
// /// Logs a formatted message string with the level.
// ///
// /// An that supplies culture-specific formatting information
// /// A String containing zero or more format items
// /// An Object array containing zero or more objects to format
// void ErrorFormat(IFormatProvider provider, string format, params object[] args);
///
/// Log a message object with the level.
///
/// The message object to log.
void Fatal( object message );
///
/// Log a message object with the level including
/// the stack trace of the passed
/// as a parameter.
///
/// The message object to log.
/// The exception to log, including its stack trace.
void Fatal( object message, Exception exception );
// ///
// /// Logs a formatted message string with the level.
// ///
// /// A String containing zero or more format items
// /// An Object array containing zero or more objects to format
// void FatalFormat(string format, params object[] args);
//
// ///
// /// Logs a formatted message string with the level.
// ///
// /// An that supplies culture-specific formatting information
// /// A String containing zero or more format items
// /// An Object array containing zero or more objects to format
// void FatalFormat(IFormatProvider provider, string format, params object[] args);
///
/// Log a message object with the level.
///
/// The message object to log.
void Info( object message );
///
/// Log a message object with the level including
/// the stack trace of the passed
/// as a parameter.
///
/// The message object to log.
/// The exception to log, including its stack trace.
void Info( object message, Exception exception );
// ///
// /// Logs a formatted message string with the level.
// ///
// /// A String containing zero or more format items
// /// An Object array containing zero or more objects to format
// void InfoFormat(string format, params object[] args);
//
// ///
// /// Logs a formatted message string with the level.
// ///
// /// An that supplies culture-specific formatting information
// /// A String containing zero or more format items
// /// An Object array containing zero or more objects to format
// void InfoFormat(IFormatProvider provider, string format, params object[] args);
///
/// Log a message object with the level.
///
/// The message object to log.
void Warn( object message );
///
/// Log a message object with the level including
/// the stack trace of the passed
/// as a parameter.
///
/// The message object to log.
/// The exception to log, including its stack trace.
void Warn( object message, Exception exception );
// ///
// /// Logs a formatted message string with the level.
// ///
// /// A String containing zero or more format items
// /// An Object array containing zero or more objects to format
// void WarnFormat(string format, params object[] args);
//
// ///
// /// Logs a formatted message string with the level.
// ///
// /// An that supplies culture-specific formatting information
// /// A String containing zero or more format items
// /// An Object array containing zero or more objects to format
// void WarnFormat(IFormatProvider provider, string format, params object[] args);
///
/// Checks if this logger is enabled for the level.
///
bool IsDebugEnabled
{
get;
}
///
/// Checks if this logger is enabled for the level.
///
bool IsErrorEnabled
{
get;
}
///
/// Checks if this logger is enabled for the level.
///
bool IsFatalEnabled
{
get;
}
///
/// Checks if this logger is enabled for the level.
///
bool IsInfoEnabled
{
get;
}
///
/// Checks if this logger is enabled for the level.
///
bool IsWarnEnabled
{
get;
}
}
}