ILog.cs :  » Persistence-Frameworks » iBATIS.NET » IBatisNet » Common » Logging » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » Persistence Frameworks » iBATIS.NET 
iBATIS.NET » IBatisNet » Common » Logging » ILog.cs

#region Apache Notice
/*****************************************************************************
 * $Header: $
 * $Revision: 474141 $
 * $Date: 2006-11-13 05:43:37 +0100 (lun., 13 nov. 2006) $
 * 
 * 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{
  /// <summary>
  /// The 7 logging levels used by Log are (in order): 
  /// </summary>
  public enum LogLevel
  {
    /// <summary>
    /// 
    /// </summary>
    All   = 0,
    /// <summary>
    /// 
    /// </summary>
    Debug = 1,
    /// <summary>
    /// 
    /// </summary>
    Info  = 2,
    /// <summary>
    /// 
    /// </summary>
    Warn  = 3,
    /// <summary>
    /// 
    /// </summary>
    Error = 4,
    /// <summary>
    ///
    /// </summary>
    Fatal = 5,
    /// <summary>
    /// Do not log anything.
    /// </summary>
    Off  = 6,
  }

  /// <summary>
  /// A simple logging interface abstracting logging APIs. Inspired by log4net.
  /// </summary>
  public interface ILog
  {
    /// <summary>
    /// Log a message object with the <see cref="LogLevel.Debug"/> level.
    /// </summary>
    /// <param name="message">The message object to log.</param>
    void Debug( object message );

    /// <summary>
    /// Log a message object with the <see cref="LogLevel.Debug"/> level including
    /// the stack trace of the <see cref="Exception"/> passed
    /// as a parameter.
    /// </summary>
    /// <param name="message">The message object to log.</param>
    /// <param name="exception">The exception to log, including its stack trace.</param>
    void Debug( object message, Exception exception );

//    /// <summary>
//    /// Logs a formatted message string with the <see cref="LogLevel.Debug"/> level.
//    /// </summary>
//    /// <param name="format">A String containing zero or more format items</param>
//    /// <param name="args">An Object array containing zero or more objects to format</param>
//    void DebugFormat(string format, params object[] args); 
//
//    /// <summary>
//    /// Logs a formatted message string with the <see cref="LogLevel.Debug"/> level.
//    /// </summary>
//    /// <param name="provider">An <see cref="IFormatProvider"/> that supplies culture-specific formatting information</param>
//    /// <param name="format">A String containing zero or more format items</param>
//    /// <param name="args">An Object array containing zero or more objects to format</param>
//    void DebugFormat(IFormatProvider provider, string format, params object[] args);

    /// <summary>
    /// Log a message object with the <see cref="LogLevel.Error"/> level.
    /// </summary>
    /// <param name="message">The message object to log.</param>
    void Error( object message );

    /// <summary>
    /// Log a message object with the <see cref="LogLevel.Error"/> level including
    /// the stack trace of the <see cref="Exception"/> passed
    /// as a parameter.
    /// </summary>
    /// <param name="message">The message object to log.</param>
    /// <param name="exception">The exception to log, including its stack trace.</param>
    void Error( object message, Exception exception );

//    /// <summary>
//    /// Logs a formatted message string with the <see cref="LogLevel.Error"/> level.
//    /// </summary>
//    /// <param name="format">A String containing zero or more format items</param>
//    /// <param name="args">An Object array containing zero or more objects to format</param>
//    void ErrorFormat(string format, params object[] args); 
//
//    /// <summary>
//    /// Logs a formatted message string with the <see cref="LogLevel.Error"/> level.
//    /// </summary>
//    /// <param name="provider">An <see cref="IFormatProvider"/> that supplies culture-specific formatting information</param>
//    /// <param name="format">A String containing zero or more format items</param>
//    /// <param name="args">An Object array containing zero or more objects to format</param>
//    void ErrorFormat(IFormatProvider provider, string format, params object[] args);

    /// <summary>
    /// Log a message object with the <see cref="LogLevel.Fatal"/> level.
    /// </summary>
    /// <param name="message">The message object to log.</param>
    void Fatal( object message );

    /// <summary>
    /// Log a message object with the <see cref="LogLevel.Fatal"/> level including
    /// the stack trace of the <see cref="Exception"/> passed
    /// as a parameter.
    /// </summary>
    /// <param name="message">The message object to log.</param>
    /// <param name="exception">The exception to log, including its stack trace.</param>
    void Fatal( object message, Exception exception );

//    /// <summary>
//    /// Logs a formatted message string with the <see cref="LogLevel.Fatal"/> level.
//    /// </summary>
//    /// <param name="format">A String containing zero or more format items</param>
//    /// <param name="args">An Object array containing zero or more objects to format</param>
//    void FatalFormat(string format, params object[] args); 
//
//    /// <summary>
//    /// Logs a formatted message string with the <see cref="LogLevel.Fatal"/> level.
//    /// </summary>
//    /// <param name="provider">An <see cref="IFormatProvider"/> that supplies culture-specific formatting information</param>
//    /// <param name="format">A String containing zero or more format items</param>
//    /// <param name="args">An Object array containing zero or more objects to format</param>
//    void FatalFormat(IFormatProvider provider, string format, params object[] args);

    /// <summary>
    /// Log a message object with the <see cref="LogLevel.Info"/> level.
    /// </summary>
    /// <param name="message">The message object to log.</param>
    void Info( object message );

    /// <summary>
    /// Log a message object with the <see cref="LogLevel.Info"/> level including
    /// the stack trace of the <see cref="Exception"/> passed
    /// as a parameter.
    /// </summary>
    /// <param name="message">The message object to log.</param>
    /// <param name="exception">The exception to log, including its stack trace.</param>
    void Info( object message, Exception exception );

//    /// <summary>
//    /// Logs a formatted message string with the <see cref="LogLevel.Info"/> level.
//    /// </summary>
//    /// <param name="format">A String containing zero or more format items</param>
//    /// <param name="args">An Object array containing zero or more objects to format</param>
//    void InfoFormat(string format, params object[] args); 
//
//    /// <summary>
//    /// Logs a formatted message string with the <see cref="LogLevel.Info"/> level.
//    /// </summary>
//    /// <param name="provider">An <see cref="IFormatProvider"/> that supplies culture-specific formatting information</param>
//    /// <param name="format">A String containing zero or more format items</param>
//    /// <param name="args">An Object array containing zero or more objects to format</param>
//    void InfoFormat(IFormatProvider provider, string format, params object[] args);

    /// <summary>
    /// Log a message object with the <see cref="LogLevel.Warn"/> level.
    /// </summary>
    /// <param name="message">The message object to log.</param>
    void Warn( object message );

    /// <summary>
    /// Log a message object with the <see cref="LogLevel.Warn"/> level including
    /// the stack trace of the <see cref="Exception"/> passed
    /// as a parameter.
    /// </summary>
    /// <param name="message">The message object to log.</param>
    /// <param name="exception">The exception to log, including its stack trace.</param>
    void Warn( object message, Exception exception );

//    /// <summary>
//    /// Logs a formatted message string with the <see cref="LogLevel.Warn"/> level.
//    /// </summary>
//    /// <param name="format">A String containing zero or more format items</param>
//    /// <param name="args">An Object array containing zero or more objects to format</param>
//    void WarnFormat(string format, params object[] args); 
//
//    /// <summary>
//    /// Logs a formatted message string with the <see cref="LogLevel.Warn"/> level.
//    /// </summary>
//    /// <param name="provider">An <see cref="IFormatProvider"/> that supplies culture-specific formatting information</param>
//    /// <param name="format">A String containing zero or more format items</param>
//    /// <param name="args">An Object array containing zero or more objects to format</param>
//    void WarnFormat(IFormatProvider provider, string format, params object[] args);

    /// <summary>
    /// Checks if this logger is enabled for the <see cref="LogLevel.Debug"/> level.
    /// </summary>
    bool IsDebugEnabled
    {
      get;
    }

    /// <summary>
    /// Checks if this logger is enabled for the <see cref="LogLevel.Error"/> level.
    /// </summary>
    bool IsErrorEnabled
    {
      get;
    }

    /// <summary>
    /// Checks if this logger is enabled for the <see cref="LogLevel.Fatal"/> level.
    /// </summary>
    bool IsFatalEnabled
    {
      get;
    }

    /// <summary>
    /// Checks if this logger is enabled for the <see cref="LogLevel.Info"/> level.
    /// </summary>
    bool IsInfoEnabled
    {
      get;
    }

    /// <summary>
    /// Checks if this logger is enabled for the <see cref="LogLevel.Warn"/> level.
    /// </summary>
    bool IsWarnEnabled
    {
      get;
    }
  }
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.