Introduction

Overview

There are a variety of logging implementations for .NET currently in use, log4net, Enterprise Library Logging, NLog, to name the most popular. The downside of having differerent implementation is that they do not share a common interface and therefore impose a particular logging implementation on the users of your library. To solve this dependency problem the Common.Logging library introduces a simple abstraction to allow you to select a specific logging implementation at runtime.

The library is based on work done by the developers of IBatis.NET and it's usage is inspired by log4net. Many thanks to the developers of those projects!

Usage

The core logging library Common.Logging provides the base logging ILog interface as well as the global LogManager that you use to instrument your code:

[C#]
ILog log = LogManager.GetCurrentClassLogger();

log.DebugFormat("Hi {0}", "dude");

To output the information logged, you need to tell Common.Logging, what underlying logging system to use. Common.Logging already includes console and trace based logger implementations usable out of the box. Adding the following configuration snippet to your app.config causes Common.Logging to output all information to the console:

[XML]
<configuration>
    <configSections>
      <sectionGroup name="common">
        <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
      </sectionGroup>
    </configSections>

    <common>
      <logging>
        <factoryAdapter type="Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter, Common.Logging">
          <arg key="level" value="DEBUG" />
        </factoryAdapter>
      </logging>
    </common>
</configuration>

Hint: When using NET 3.5, you can leverage lambda syntax for logging to avoid any performance penalties:

[C#]
log.Debug( m=>m("value= {0}", obj.ExpensiveToCalculateValue) );

This ensures, that the whole expression is only evaluated when LogLevel.Debug is enabled and thus saves you from having to write

[C#]
if (log.IsDebugEnabled)
{
    log.Debug("value={0}", obj.ExpensiveToCalculateValue);
}

Bridging between logging systems

Ever had the problem you used frameworks that were tied to different logging systems? Each Common.Logging integration module comes with to plugs: One to route log messages to the 3rd party logging system and one to capture log messages from one logging system and feed it into the Common.Logging infrastructure. So if one of your frameworks uses log4net, another NLog and you want to log everything to System.Diagnostics.Trace, Common.Logging is for you.

Upgrading from a previous version

The new version of Common.Logging assembly is 100% binary backwards compatible to previous versions of LogManager and ILog interfaces. To upgrade, either you rebuild your project against the new version or you configure an assembly version redirect in your app.config:

<configuration>
  <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
           <assemblyIdentity name="Common.Logging" publicKeyToken="af08829b84f0328e" culture=""/>
           <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2.0.0.0"/>
        </dependentAssembly>
     </assemblyBinding>
  </runtime>
</configuration>

Those who implemented their own Common.Logging.ILoggerFactoryAdapter and Common.Logging.ILog interfaces, need to update their code to the extended interfaces coming with version 2.0. For convenience Common.Logging comes with a couple of support classes, making this task as easy as possible as described in the reference documentation

Customizing

In the case you want to integrate your own logging system that is not supported by Common.Logging yet, it is easily possible to implement your own plugin by implementing ILoggerFactoryAdapter. For convenience there is a base AbstractCachingLoggerFactoryAdapter implementation available that usually makes implementing your own adapter a breeze.

<system.diagnostics> Integration

If your code or a framework you are using (like Microsoft Enterprise Library's Logging Block) already uses the .NET framework's built-in System.Diagnostics.Trace system, you can use CommonLoggingTraceListener to redirect all trace output to the Common.Logging infrastructure.

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.


Common.Logging

Common Logging 2.0 API Reference

Common.Logging Assembly

This assembly contains the core functionality of the Common.Logging framework. In particular, checkout LogManager and ILog for usage information.

Referenced Assemblies

Assembly Reference | Description
mscorlib |
System |
System.Configuration |
System.Xml |

Dependent Assemblies

Assembly Description
Common.Logging.EntLib

This assembly contains the adapter to plug Microsoft Enterprise Logging Library 3.1. into the Common.Logging infrastructure.

For an example on how to configure

  • Common.Logging to render its output to Entlib, see EntLibLoggerFactoryAdapter.
  • Entlib to render its output to Common.Logging use CommonLoggingEntlibTraceListener.
Common.Logging.EntLib41

This assembly contains the adapter to plug Microsoft Enterprise Logging Library 4.1. into the Common.Logging infrastructure.

For an example on how to configure

  • Common.Logging to render its output to Entlib, see EntLibLoggerFactoryAdapter.
  • Entlib to render its output to Common.Logging use CommonLoggingEntlibTraceListener.
Common.Logging.Log4Net

This assembly contains the adapter to the log4net 1.2.10 library

For an example on how to configure

  • Common.Logging to render its output to log4net, see Log4NetLoggerFactoryAdapter.
  • log4net to render its output to Common.Logging use CommonLoggingAppender.
Common.Logging.Log4Net129

This assembly contains the adapter to the log4net 1.2.9 library

For an example on how to configure

  • Common.Logging to render its output to log4net, see Log4NetLoggerFactoryAdapter.
  • log4net to render its output to Common.Logging use CommonLoggingAppender.
Common.Logging.NLog

This assembly contains the implementations to plug NLog 1.0.0.505 into Common.Logging.

For an example on how to configure

  • Common.Logging to render its output to Entlib, see NLogLoggerFactoryAdapter.
  • NLog to render its output to Common.Logging use CommonLoggingTarget.

Namespaces

Namespace | Description
Common.Logging | This namespace contains all core classes making up the Common.Logging framework.
Common.Logging.Configuration | This namespace contains various utility classes.
Common.Logging.Factory | This namespace contains convenience base classes for implementing your own ILoggerFactoryAdapters.
Common.Logging.Simple | This namespace contains out-of-the-box adapters to intrinsic systems, namely ConsoleOutLoggerFactoryAdapter and TraceLoggerFactoryAdapter.

Classes

Class | Description
AbstractCachingLoggerFactoryAdapter | An implementation of ILoggerFactoryAdapter that caches loggers handed out by this factory.
AbstractLogger | Provides base implementation common for most logger adapters
AbstractSimpleLogger | Abstract class providing a standard implementation of simple loggers.
AbstractSimpleLoggerFactoryAdapter | Base factory implementation for creating simple ILog instances.
ArgUtils | Various utility methods for using during factory and logger instance configuration
CapturingLogger | A logger created by CapturingLoggerFactoryAdapter that sends all log events to the owning adapter's AddEvent
CapturingLoggerEvent | A logging event captured by CapturingLogger
CapturingLoggerFactoryAdapter | An adapter, who's loggers capture all log events and send them to AddEvent. Retrieve the list of log events from LoggerEvents.
CommonLoggingTraceListener | A TraceListener implementation sending all System.Diagnostics.Trace output to the Common.Logging infrastructure.
ConfigurationException | The exception that is thrown when a configuration system error has occurred with Common.Logging
ConfigurationSectionHandler | Used in an application's configuration file (App.Config or Web.Config) to configure the logging subsystem.
ConsoleOutLogger | Sends log messages to Out.
ConsoleOutLoggerFactoryAdapter | Factory for creating ILog instances that write data to Out.
DefaultConfigurationReader | Implementation of IConfigurationReader that uses the standard .NET configuration APIs, ConfigurationSettings in 1.x and ConfigurationManager in 2.0
LogManager | Use the LogManager's GetLogger or GetLogger methods to obtain ILog instances for logging.
LogSetting | Container used to hold configuration information from config file.
NoOpLogger | Silently ignores all log messages.
NoOpLoggerFactoryAdapter | Factory for creating ILog instances that silently ignores logging requests.
TraceLogger | Logger sending everything to the trace output stream using Trace.
TraceLoggerFactoryAdapter | Factory for creating ILog instances that send everything to the Trace output stream.

Interfaces

Interface | Description
IConfigurationReader | Interface for basic operations to read .NET application configuration information.
ILog | A simple logging interface abstracting logging APIs.
ILoggerFactoryAdapter | LoggerFactoryAdapter interface is used internally by LogManager Only developers wishing to write new Common.Logging adapters need to worry about this interface.

Delegates

Delegate | Description
AbstractLogger.WriteHandler | Represents a method responsible for writing a message to the log system.
ArgUtils.Action | An anonymous action delegate with no arguments and no return value.
ArgUtils.Function(T) | An anonymous action delegate with no arguments and no return value.
ArgUtils.ParseHandler(T) | A delegate converting a string representation into the target type
FormatMessageHandler | The type of method that is passed into e.g. Debug and allows the callback method to "submit" it's message to the underlying output system.

Enumerations

Enumeration | Description
LogLevel | The 7 possible logging levels

Generated from assembly Common.Logging [2.0.0.3403] by NDoc3


Common.Logging

Common Logging 2.0 API Reference

Common.Logging Namespace

This namespace contains all core classes making up the Common.Logging framework.

Namespace Hierarchy

Classes

Class | Description
ConfigurationException | The exception that is thrown when a configuration system error has occurred with Common.Logging
ConfigurationSectionHandler | Used in an application's configuration file (App.Config or Web.Config) to configure the logging subsystem.
LogManager | Use the LogManager's GetLogger or GetLogger methods to obtain ILog instances for logging.

Interfaces

Interface | Description
IConfigurationReader | Interface for basic operations to read .NET application configuration information.
ILog | A simple logging interface abstracting logging APIs.
ILoggerFactoryAdapter | LoggerFactoryAdapter interface is used internally by LogManager Only developers wishing to write new Common.Logging adapters need to worry about this interface.

Delegates

Delegate | Description
FormatMessageHandler | The type of method that is passed into e.g. Debug and allows the callback method to "submit" it's message to the underlying output system.

Enumerations

Enumeration | Description
LogLevel | The 7 possible logging levels


ConfigurationException Class

The exception that is thrown when a configuration system error has occurred with Common.Logging

For a list of all members of this type, see ConfigurationException Members .

System.Object
Exception
ApplicationException
ConfigurationException

[Visual Basic]
<Serializable> _
Public Class ConfigurationException
Inherits ApplicationException
[C#]
[Serializable]
public class ConfigurationException : ApplicationException

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging

Assembly: Common.Logging (in Common.Logging.dll)

See Also

ConfigurationException Members | Common.Logging Namespace


ConfigurationException Members

ConfigurationException overview

Public Instance Constructors

ConfigurationException Overloaded. Initializes a new instance of the ConfigurationException class.

Public Instance Properties

Data (inherited from Exception)
HelpLink (inherited from Exception)
InnerException (inherited from Exception)
Message (inherited from Exception)
Source (inherited from Exception)
StackTrace (inherited from Exception)
TargetSite (inherited from Exception)

Public Instance Methods

Equals (inherited from Object)
GetBaseException (inherited from Exception)
GetHashCode (inherited from Object)
GetObjectData (inherited from Exception)
GetType (inherited from Exception)
ToString (inherited from Exception)

Protected Instance Constructors

ConfigurationException Overloaded. Initializes a new instance of the ConfigurationException class.

Protected Instance Properties

HResult (inherited from Exception)

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

ConfigurationException Class | Common.Logging Namespace


ConfigurationException Constructor

Creates a new instance of the ObjectsException class.

Overload List

Creates a new instance of the ObjectsException class.

public ConfigurationException()

Creates a new instance of the ConfigurationException class.

protected ConfigurationException(SerializationInfo,StreamingContext)

Creates a new instance of the ConfigurationException class. with the specified message.

public ConfigurationException(string)

Creates a new instance of the ConfigurationException class with the specified message and root cause.

public ConfigurationException(string,Exception)

See Also

ConfigurationException Class | Common.Logging Namespace


ConfigurationException Constructor

Creates a new instance of the ObjectsException class.

[Visual Basic]
Public Overloads Sub New()
[C#]
ConfigurationException();

See Also

ConfigurationException Class | Common.Logging Namespace | ConfigurationException Constructor Overload List


ConfigurationException Constructor

Creates a new instance of the ConfigurationException class. with the specified message.

[Visual Basic]
Public Overloads Sub New( _
ByVal message As String _
)
[C#]
ConfigurationException(
string message
);

Parameters

message
A message about the exception.

See Also

ConfigurationException Class | Common.Logging Namespace | ConfigurationException Constructor Overload List


ConfigurationException Constructor

Creates a new instance of the ConfigurationException class with the specified message and root cause.

[Visual Basic]
Public Overloads Sub New( _
ByVal message As String, _
ByVal rootCause As Exception _
)
[C#]
ConfigurationException(
string message,
Exception rootCause
);

Parameters

message
A message about the exception.
rootCause
The root exception that is being wrapped.

See Also

ConfigurationException Class | Common.Logging Namespace | ConfigurationException Constructor Overload List


ConfigurationException Constructor

Creates a new instance of the ConfigurationException class.

[Visual Basic]
Protected Overloads Sub New( _
ByVal info As SerializationInfo, _
ByVal context As StreamingContext _
)
[C#]
ConfigurationException(
SerializationInfo info,
StreamingContext context
);

Parameters

info
The SerializationInfo that holds the serialized object data about the exception being thrown.
context
The StreamingContext that contains contextual information about the source or destination.

See Also

ConfigurationException Class | Common.Logging Namespace | ConfigurationException Constructor Overload List


ConfigurationSectionHandler Class

Used in an application's configuration file (App.Config or Web.Config) to configure the logging subsystem.

For a list of all members of this type, see ConfigurationSectionHandler Members .

System.Object
ConfigurationSectionHandler

[Visual Basic]
Public Class ConfigurationSectionHandler
Implements IConfigurationSectionHandler
[C#]
public class ConfigurationSectionHandler : IConfigurationSectionHandler

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Example

An example configuration section that writes log messages to the Console using the built-in Console Logger.

[XML]
<configuration>
    <configSections>
      <sectionGroup name="common">
        <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
      </sectionGroup>
    </configSections>
    <common>
      <logging>
        <factoryAdapter type="Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter, Common.Logging">
          <arg key="showLogName" value="true" />
          <arg key="showDataTime" value="true" />
          <arg key="level" value="ALL" />
          <arg key="dateTimeFormat" value="yyyy/MM/dd HH:mm:ss:fff" />
        </factoryAdapter>
      </logging>
    </common>
</configuration>

Requirements

Namespace: Common.Logging

Assembly: Common.Logging (in Common.Logging.dll)

See Also

ConfigurationSectionHandler Members | Common.Logging Namespace


ConfigurationSectionHandler Members

ConfigurationSectionHandler overview

Public Instance Constructors

ConfigurationSectionHandler Constructor Constructor

Public Instance Methods

Create | Verifies that the logFactoryAdapter element appears once in the configuration section.
Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

ConfigurationSectionHandler Class | Common.Logging Namespace


ConfigurationSectionHandler Constructor

Constructor

[Visual Basic]
Public Sub New()
[C#]
ConfigurationSectionHandler();

See Also

ConfigurationSectionHandler Class | Common.Logging Namespace


ConfigurationSectionHandler Methods

The methods of the ConfigurationSectionHandler class are listed below. For a complete list of ConfigurationSectionHandler class members, see the ConfigurationSectionHandler Members topic.

Public Instance Methods

Create | Verifies that the logFactoryAdapter element appears once in the configuration section.
Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

ConfigurationSectionHandler Class | Common.Logging Namespace


ConfigurationSectionHandler.Create Method

Verifies that the logFactoryAdapter element appears once in the configuration section.

[Visual Basic]
Public Sub Create( _
ByVal parent As LogSetting, _
ByVal configContext As Object, _
ByVal section As XmlNode _
)
[C#]
public LogSetting Create(
LogSetting parent,
object configContext,
XmlNode section
);

Parameters

parent
settings of a parent section - atm this must always be null
configContext
Additional information about the configuration process.
section
The configuration section to apply an XPath query too.

Return Value

A LogSetting object containing the specified logFactoryAdapter type along with user supplied configuration properties.

See Also

ConfigurationSectionHandler Class | Common.Logging Namespace


FormatMessageHandler Delegate

The type of method that is passed into e.g. Debug and allows the callback method to "submit" it's message to the underlying output system.

[Visual Basic]
Public Delegate Function FormatMessageHandler( _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
public delegate string FormatMessageHandler(
string format,
params object[] args
);

Parameters

format
the format argument as in Format
args
the argument list as in Format

Requirements

Namespace: Common.Logging

Assembly: Common.Logging (in Common.Logging.dll)

See Also

Common.Logging Namespace | ILog


IConfigurationReader Interface

Interface for basic operations to read .NET application configuration information.

For a list of all members of this type, see IConfigurationReader Members .

[Visual Basic]
Public Interface IConfigurationReader
[C#]
public interface IConfigurationReader

Types that implement IConfigurationReader

Type | Description
DefaultConfigurationReader | Implementation of IConfigurationReader that uses the standard .NET configuration APIs, ConfigurationSettings in 1.x and ConfigurationManager in 2.0

Remarks

Provides a simple abstraction to handle BCL API differences between .NET 1.x and 2.0. Also useful for testing scenarios.

Requirements

Namespace: Common.Logging

Assembly: Common.Logging (in Common.Logging.dll)

See Also

IConfigurationReader Members | Common.Logging Namespace


IConfigurationReader Members

IConfigurationReader overview

Public Instance Methods

GetSection Parses the configuration section and returns the resulting object.

See Also

IConfigurationReader Interface | Common.Logging Namespace


IConfigurationReader Methods

The methods of the IConfigurationReader interface are listed below. For a complete list of IConfigurationReader interface members, see the IConfigurationReader Members topic.

Public Instance Methods

GetSection Parses the configuration section and returns the resulting object.

See Also

IConfigurationReader Interface | Common.Logging Namespace


IConfigurationReader.GetSection Method

Parses the configuration section and returns the resulting object.

[Visual Basic]
Public Sub GetSection( _
ByVal sectionName As String _
)
[C#]
object GetSection(
string sectionName
);

Parameters

sectionName
Name of the configuration section.

Return Value

Object created by a corresponding IConfigurationSectionHandler.

Remarks

Primary purpose of this method is to allow us to parse and load configuration sections using the same API regardless of the .NET framework version.

See Also

IConfigurationReader Interface | Common.Logging Namespace


ILog Interface

A simple logging interface abstracting logging APIs.

For a list of all members of this type, see ILog Members .

[Visual Basic]
Public Interface ILog
[C#]
public interface ILog

Types that implement ILog

Type | Description
EntLibLogger | Concrete implementation of ILog interface specific to Enterprise Logging 4.1.
EntLibLogger | Concrete implementation of ILog interface specific to Enterprise Logging 3.1.
AbstractLogger | Provides base implementation common for most logger adapters
Log4NetLogger | Concrete implementation of ILog interface specific to log4net 1.2.9.
Log4NetLogger | Concrete implementation of ILog interface specific to log4net 1.2.10.
NLogLogger | Concrete implementation of ILog interface specific to NLog 1.0.0.505.
AbstractSimpleLogger | Abstract class providing a standard implementation of simple loggers.
CapturingLogger | A logger created by CapturingLoggerFactoryAdapter that sends all log events to the owning adapter's AddEvent
ConsoleOutLogger | Sends log messages to Out.
NoOpLogger | Silently ignores all log messages.
TraceLogger | Logger sending everything to the trace output stream using Trace.

Remarks

Implementations should defer calling a message's ToString until the message really needs to be logged to avoid performance penalties.

Each ILog log method offers to pass in a Action`1 instead of the actual message. Using this style has the advantage to defer possibly expensive message argument evaluation and formatting (and formatting arguments!) until the message gets actually logged. If the message is not logged at all (e.g. due to LogLevel settings), you won't have to pay the peformance penalty of creating the message.

Example

The example below demonstrates using callback style for creating the message, where the call to the NextDouble and the underlying Format only happens, if level Debug is enabled:

Log.Debug( m=>m("result is {0}", random.NextDouble()) );
Log.Debug(delegate(m) { m("result is {0}", random.NextDouble()); });

Requirements

Namespace: Common.Logging

Assembly: Common.Logging (in Common.Logging.dll)

See Also

ILog Members | Common.Logging Namespace | Action`1


ILog Members

ILog overview

Public Instance Properties

IsDebugEnabled | Checks if this logger is enabled for the Debug level.
IsErrorEnabled | Checks if this logger is enabled for the Error level.
IsFatalEnabled | Checks if this logger is enabled for the Fatal level.
IsInfoEnabled | Checks if this logger is enabled for the Info level.
IsTraceEnabled | Checks if this logger is enabled for the Trace level.
IsWarnEnabled | Checks if this logger is enabled for the Warn level.

Public Instance Methods

Debug | Overloaded. Log a message object with the Debug level.
DebugFormat | Overloaded. Log a message with the Debug level.
Error | Overloaded. Log a message object with the Error level.
ErrorFormat | Overloaded. Log a message with the Error level.
Fatal | Overloaded. Log a message object with the Fatal level.
FatalFormat | Overloaded. Log a message with the Fatal level.
Info | Overloaded. Log a message object with the Info level.
InfoFormat | Overloaded. Log a message with the Info level.
Trace | Overloaded. Log a message object with the Trace level.
TraceFormat | Overloaded. Log a message with the Trace level.
Warn | Overloaded. Log a message with the Warn level using a callback to obtain the message
WarnFormat | Overloaded. Log a message with the Warn level.

See Also

ILog Interface | Common.Logging Namespace | Action`1


ILog Properties

The properties of the ILog interface are listed below. For a complete list of ILog interface members, see the ILog Members topic.

Public Instance Properties

IsDebugEnabled | Checks if this logger is enabled for the Debug level.
IsErrorEnabled | Checks if this logger is enabled for the Error level.
IsFatalEnabled | Checks if this logger is enabled for the Fatal level.
IsInfoEnabled | Checks if this logger is enabled for the Info level.
IsTraceEnabled | Checks if this logger is enabled for the Trace level.
IsWarnEnabled | Checks if this logger is enabled for the Warn level.

See Also

ILog Interface | Common.Logging Namespace | Action`1


IsDebugEnabled Property

Common Logging 2.0 API Reference

ILog.IsDebugEnabled Property

Checks if this logger is enabled for the Debug level.

[Visual Basic]
Public MustOverride ReadOnly Property IsDebugEnabled() As Boolean
Public Get
End Get
End Property
[C#]
public bool IsDebugEnabled { public get; }

See Also

ILog Interface | Common.Logging Namespace


IsErrorEnabled Property

Common Logging 2.0 API Reference

ILog.IsErrorEnabled Property

Checks if this logger is enabled for the Error level.

[Visual Basic]
Public MustOverride ReadOnly Property IsErrorEnabled() As Boolean
Public Get
End Get
End Property
[C#]
public bool IsErrorEnabled { public get; }

See Also

ILog Interface | Common.Logging Namespace


IsFatalEnabled Property

Common Logging 2.0 API Reference

ILog.IsFatalEnabled Property

Checks if this logger is enabled for the Fatal level.

[Visual Basic]
Public MustOverride ReadOnly Property IsFatalEnabled() As Boolean
Public Get
End Get
End Property
[C#]
public bool IsFatalEnabled { public get; }

See Also

ILog Interface | Common.Logging Namespace


IsInfoEnabled Property

Common Logging 2.0 API Reference

ILog.IsInfoEnabled Property

Checks if this logger is enabled for the Info level.

[Visual Basic]
Public MustOverride ReadOnly Property IsInfoEnabled() As Boolean
Public Get
End Get
End Property
[C#]
public bool IsInfoEnabled { public get; }

See Also

ILog Interface | Common.Logging Namespace


IsTraceEnabled Property

Common Logging 2.0 API Reference

ILog.IsTraceEnabled Property

Checks if this logger is enabled for the Trace level.

[Visual Basic]
Public MustOverride ReadOnly Property IsTraceEnabled() As Boolean
Public Get
End Get
End Property
[C#]
public bool IsTraceEnabled { public get; }

See Also

ILog Interface | Common.Logging Namespace


IsWarnEnabled Property

Common Logging 2.0 API Reference

ILog.IsWarnEnabled Property

Checks if this logger is enabled for the Warn level.

[Visual Basic]
Public MustOverride ReadOnly Property IsWarnEnabled() As Boolean
Public Get
End Get
End Property
[C#]
public bool IsWarnEnabled { public get; }

See Also

ILog Interface | Common.Logging Namespace


ILog Methods

The methods of the ILog interface are listed below. For a complete list of ILog interface members, see the ILog Members topic.

Public Instance Methods

Debug | Overloaded. Log a message object with the Debug level.
DebugFormat | Overloaded. Log a message with the Debug level.
Error | Overloaded. Log a message object with the Error level.
ErrorFormat | Overloaded. Log a message with the Error level.
Fatal | Overloaded. Log a message object with the Fatal level.
FatalFormat | Overloaded. Log a message with the Fatal level.
Info | Overloaded. Log a message object with the Info level.
InfoFormat | Overloaded. Log a message with the Info level.
Trace | Overloaded. Log a message object with the Trace level.
TraceFormat | Overloaded. Log a message with the Trace level.
Warn | Overloaded. Log a message with the Warn level using a callback to obtain the message
WarnFormat | Overloaded. Log a message with the Warn level.

See Also

ILog Interface | Common.Logging Namespace | Action`1


Debug Method

Common Logging 2.0 API Reference

ILog.Debug Method

Log a message with the Debug level using a callback to obtain the message

Overload List

Log a message with the Debug level using a callback to obtain the message

void Debug(Action<FormatMessageHandler>)

Log a message with the Debug level using a callback to obtain the message

void Debug(Action<FormatMessageHandler>,Exception)

Log a message with the Debug level using a callback to obtain the message

void Debug(IFormatProvider,Action<FormatMessageHandler>)

Log a message with the Debug level using a callback to obtain the message

void Debug(IFormatProvider,Action<FormatMessageHandler>,Exception)

Log a message object with the Debug level.

void Debug(object)

Log a message object with the Debug level including the stack trace of the Exception passed as a parameter.

void Debug(object,Exception)

See Also

ILog Interface | Common.Logging Namespace


ILog.Debug(Action) Method

Log a message with the Debug level using a callback to obtain the message

[Visual Basic]
Public Sub Debug( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
)
[C#]
void Debug(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Debug Overload List


ILog.Debug(Action, Exception) Method

Log a message with the Debug level using a callback to obtain the message

[Visual Basic]
Public Sub Debug( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
)
[C#]
void Debug(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack trace.

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Debug Overload List


ILog.Debug(IFormatProvider, Action) Method

Log a message with the Debug level using a callback to obtain the message

[Visual Basic]
Public Sub Debug( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
)
[C#]
void Debug(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Debug Overload List


ILog.Debug(IFormatProvider, Action, Exception) Method

Log a message with the Debug level using a callback to obtain the message

[Visual Basic]
Public Sub Debug( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
)
[C#]
void Debug(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Debug.

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Debug Overload List


ILog.Debug(Object) Method

Log a message object with the Debug level.

[Visual Basic]
Public Sub Debug( _
ByVal message As Object _
)
[C#]
void Debug(
object message
);

Parameters

message
The message object to log.

See Also

ILog Interface | Common.Logging Namespace | ILog.Debug Overload List


ILog.Debug(Object, Exception) Method

Log a message object with the Debug level including the stack trace of the Exception passed as a parameter.

[Visual Basic]
Public Sub Debug( _
ByVal message As Object, _
ByVal exception As Exception _
)
[C#]
void Debug(
object message,
Exception exception
);

Parameters

message
The message object to log.
exception
The exception to log, including its stack trace.

See Also

ILog Interface | Common.Logging Namespace | ILog.Debug Overload List


DebugFormat Method

Common Logging 2.0 API Reference

ILog.DebugFormat Method

Log a message with the Debug level.

Overload List

Log a message with the Debug level.

void DebugFormat(IFormatProvider,string,Exception,params object[])

Log a message with the Debug level.

void DebugFormat(IFormatProvider,string,params object[])

Log a message with the Debug level.

void DebugFormat(string,Exception,params object[])

Log a message with the Debug level.

void DebugFormat(string,params object[])

See Also

ILog Interface | Common.Logging Namespace


ILog.DebugFormat(IFormatProvider, String, Exception, Object) Method

Log a message with the Debug level.

[Visual Basic]
Public Sub DebugFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
)
[C#]
void DebugFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
exception
The exception to log.
args

See Also

ILog Interface | Common.Logging Namespace | ILog.DebugFormat Overload List


ILog.DebugFormat(IFormatProvider, String, Object) Method

Log a message with the Debug level.

[Visual Basic]
Public Sub DebugFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
void DebugFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
args

See Also

ILog Interface | Common.Logging Namespace | ILog.DebugFormat Overload List


ILog.DebugFormat(String, Exception, Object) Method

Log a message with the Debug level.

[Visual Basic]
Public Sub DebugFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
)
[C#]
void DebugFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of format arguments

See Also

ILog Interface | Common.Logging Namespace | ILog.DebugFormat Overload List


ILog.DebugFormat(String, Object) Method

Log a message with the Debug level.

[Visual Basic]
Public Sub DebugFormat( _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
void DebugFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args
the list of format arguments

See Also

ILog Interface | Common.Logging Namespace | ILog.DebugFormat Overload List


Error Method

Common Logging 2.0 API Reference

ILog.Error Method

Log a message with the Error level using a callback to obtain the message

Overload List

Log a message with the Error level using a callback to obtain the message

void Error(Action<FormatMessageHandler>)

Log a message with the Error level using a callback to obtain the message

void Error(Action<FormatMessageHandler>,Exception)

Log a message with the Error level using a callback to obtain the message

void Error(IFormatProvider,Action<FormatMessageHandler>)

Log a message with the Error level using a callback to obtain the message

void Error(IFormatProvider,Action<FormatMessageHandler>,Exception)

Log a message object with the Error level.

void Error(object)

Log a message object with the Error level including the stack trace of the Exception passed as a parameter.

void Error(object,Exception)

See Also

ILog Interface | Common.Logging Namespace


ILog.Error(Action) Method

Log a message with the Error level using a callback to obtain the message

[Visual Basic]
Public Sub Error( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
)
[C#]
void Error(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Error Overload List


ILog.Error(Action, Exception) Method

Log a message with the Error level using a callback to obtain the message

[Visual Basic]
Public Sub Error( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
)
[C#]
void Error(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack trace.

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Error Overload List


ILog.Error(IFormatProvider, Action) Method

Log a message with the Error level using a callback to obtain the message

[Visual Basic]
Public Sub Error( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
)
[C#]
void Error(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Error Overload List


ILog.Error(IFormatProvider, Action, Exception) Method

Log a message with the Error level using a callback to obtain the message

[Visual Basic]
Public Sub Error( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
)
[C#]
void Error(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Error.

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Error Overload List


ILog.Error(Object) Method

Log a message object with the Error level.

[Visual Basic]
Public Sub Error( _
ByVal message As Object _
)
[C#]
void Error(
object message
);

Parameters

message
The message object to log.

See Also

ILog Interface | Common.Logging Namespace | ILog.Error Overload List


ILog.Error(Object, Exception) Method

Log a message object with the Error level including the stack trace of the Exception passed as a parameter.

[Visual Basic]
Public Sub Error( _
ByVal message As Object, _
ByVal exception As Exception _
)
[C#]
void Error(
object message,
Exception exception
);

Parameters

message
The message object to log.
exception
The exception to log, including its stack trace.

See Also

ILog Interface | Common.Logging Namespace | ILog.Error Overload List


ErrorFormat Method

Common Logging 2.0 API Reference

ILog.ErrorFormat Method

Log a message with the Error level.

Overload List

Log a message with the Error level.

void ErrorFormat(IFormatProvider,string,Exception,params object[])

Log a message with the Error level.

void ErrorFormat(IFormatProvider,string,params object[])

Log a message with the Error level.

void ErrorFormat(string,Exception,params object[])

Log a message with the Error level.

void ErrorFormat(string,params object[])

See Also

ILog Interface | Common.Logging Namespace


ILog.ErrorFormat(IFormatProvider, String, Exception, Object) Method

Log a message with the Error level.

[Visual Basic]
Public Sub ErrorFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
)
[C#]
void ErrorFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
exception
The exception to log.
args

See Also

ILog Interface | Common.Logging Namespace | ILog.ErrorFormat Overload List


ILog.ErrorFormat(IFormatProvider, String, Object) Method

Log a message with the Error level.

[Visual Basic]
Public Sub ErrorFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
void ErrorFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
args

See Also

ILog Interface | Common.Logging Namespace | ILog.ErrorFormat Overload List


ILog.ErrorFormat(String, Exception, Object) Method

Log a message with the Error level.

[Visual Basic]
Public Sub ErrorFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
)
[C#]
void ErrorFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of format arguments

See Also

ILog Interface | Common.Logging Namespace | ILog.ErrorFormat Overload List


ILog.ErrorFormat(String, Object) Method

Log a message with the Error level.

[Visual Basic]
Public Sub ErrorFormat( _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
void ErrorFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args
the list of format arguments

See Also

ILog Interface | Common.Logging Namespace | ILog.ErrorFormat Overload List


Fatal Method

Common Logging 2.0 API Reference

ILog.Fatal Method

Log a message with the Fatal level using a callback to obtain the message

Overload List

Log a message with the Fatal level using a callback to obtain the message

void Fatal(Action<FormatMessageHandler>)

Log a message with the Fatal level using a callback to obtain the message

void Fatal(Action<FormatMessageHandler>,Exception)

Log a message with the Fatal level using a callback to obtain the message

void Fatal(IFormatProvider,Action<FormatMessageHandler>)

Log a message with the Fatal level using a callback to obtain the message

void Fatal(IFormatProvider,Action<FormatMessageHandler>,Exception)

Log a message object with the Fatal level.

void Fatal(object)

Log a message object with the Fatal level including the stack trace of the Exception passed as a parameter.

void Fatal(object,Exception)

See Also

ILog Interface | Common.Logging Namespace


ILog.Fatal(Action) Method

Log a message with the Fatal level using a callback to obtain the message

[Visual Basic]
Public Sub Fatal( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
)
[C#]
void Fatal(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Fatal Overload List


ILog.Fatal(Action, Exception) Method

Log a message with the Fatal level using a callback to obtain the message

[Visual Basic]
Public Sub Fatal( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
)
[C#]
void Fatal(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack trace.

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Fatal Overload List


ILog.Fatal(IFormatProvider, Action) Method

Log a message with the Fatal level using a callback to obtain the message

[Visual Basic]
Public Sub Fatal( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
)
[C#]
void Fatal(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Fatal Overload List


ILog.Fatal(IFormatProvider, Action, Exception) Method

Log a message with the Fatal level using a callback to obtain the message

[Visual Basic]
Public Sub Fatal( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
)
[C#]
void Fatal(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Fatal.

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Fatal Overload List


ILog.Fatal(Object) Method

Log a message object with the Fatal level.

[Visual Basic]
Public Sub Fatal( _
ByVal message As Object _
)
[C#]
void Fatal(
object message
);

Parameters

message
The message object to log.

See Also

ILog Interface | Common.Logging Namespace | ILog.Fatal Overload List


ILog.Fatal(Object, Exception) Method

Log a message object with the Fatal level including the stack trace of the Exception passed as a parameter.

[Visual Basic]
Public Sub Fatal( _
ByVal message As Object, _
ByVal exception As Exception _
)
[C#]
void Fatal(
object message,
Exception exception
);

Parameters

message
The message object to log.
exception
The exception to log, including its stack trace.

See Also

ILog Interface | Common.Logging Namespace | ILog.Fatal Overload List


FatalFormat Method

Common Logging 2.0 API Reference

ILog.FatalFormat Method

Log a message with the Fatal level.

Overload List

Log a message with the Fatal level.

void FatalFormat(IFormatProvider,string,Exception,params object[])

Log a message with the Fatal level.

void FatalFormat(IFormatProvider,string,params object[])

Log a message with the Fatal level.

void FatalFormat(string,Exception,params object[])

Log a message with the Fatal level.

void FatalFormat(string,params object[])

See Also

ILog Interface | Common.Logging Namespace


ILog.FatalFormat(IFormatProvider, String, Exception, Object) Method

Log a message with the Fatal level.

[Visual Basic]
Public Sub FatalFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
)
[C#]
void FatalFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
exception
The exception to log.
args

See Also

ILog Interface | Common.Logging Namespace | ILog.FatalFormat Overload List


ILog.FatalFormat(IFormatProvider, String, Object) Method

Log a message with the Fatal level.

[Visual Basic]
Public Sub FatalFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
void FatalFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
args

See Also

ILog Interface | Common.Logging Namespace | ILog.FatalFormat Overload List


ILog.FatalFormat(String, Exception, Object) Method

Log a message with the Fatal level.

[Visual Basic]
Public Sub FatalFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
)
[C#]
void FatalFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of format arguments

See Also

ILog Interface | Common.Logging Namespace | ILog.FatalFormat Overload List


ILog.FatalFormat(String, Object) Method

Log a message with the Fatal level.

[Visual Basic]
Public Sub FatalFormat( _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
void FatalFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args
the list of format arguments

See Also

ILog Interface | Common.Logging Namespace | ILog.FatalFormat Overload List


Info Method

Common Logging 2.0 API Reference

ILog.Info Method

Log a message with the Info level using a callback to obtain the message

Overload List

Log a message with the Info level using a callback to obtain the message

void Info(Action<FormatMessageHandler>)

Log a message with the Info level using a callback to obtain the message

void Info(Action<FormatMessageHandler>,Exception)

Log a message with the Info level using a callback to obtain the message

void Info(IFormatProvider,Action<FormatMessageHandler>)

Log a message with the Info level using a callback to obtain the message

void Info(IFormatProvider,Action<FormatMessageHandler>,Exception)

Log a message object with the Info level.

void Info(object)

Log a message object with the Info level including the stack trace of the Exception passed as a parameter.

void Info(object,Exception)

See Also

ILog Interface | Common.Logging Namespace


ILog.Info(Action) Method

Log a message with the Info level using a callback to obtain the message

[Visual Basic]
Public Sub Info( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
)
[C#]
void Info(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Info Overload List


ILog.Info(Action, Exception) Method

Log a message with the Info level using a callback to obtain the message

[Visual Basic]
Public Sub Info( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
)
[C#]
void Info(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack trace.

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Info Overload List


ILog.Info(IFormatProvider, Action) Method

Log a message with the Info level using a callback to obtain the message

[Visual Basic]
Public Sub Info( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
)
[C#]
void Info(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Info Overload List


ILog.Info(IFormatProvider, Action, Exception) Method

Log a message with the Info level using a callback to obtain the message

[Visual Basic]
Public Sub Info( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
)
[C#]
void Info(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Info.

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Info Overload List


ILog.Info(Object) Method

Log a message object with the Info level.

[Visual Basic]
Public Sub Info( _
ByVal message As Object _
)
[C#]
void Info(
object message
);

Parameters

message
The message object to log.

See Also

ILog Interface | Common.Logging Namespace | ILog.Info Overload List


ILog.Info(Object, Exception) Method

Log a message object with the Info level including the stack trace of the Exception passed as a parameter.

[Visual Basic]
Public Sub Info( _
ByVal message As Object, _
ByVal exception As Exception _
)
[C#]
void Info(
object message,
Exception exception
);

Parameters

message
The message object to log.
exception
The exception to log, including its stack trace.

See Also

ILog Interface | Common.Logging Namespace | ILog.Info Overload List


InfoFormat Method

Common Logging 2.0 API Reference

ILog.InfoFormat Method

Log a message with the Info level.

Overload List

Log a message with the Info level.

void InfoFormat(IFormatProvider,string,Exception,params object[])

Log a message with the Info level.

void InfoFormat(IFormatProvider,string,params object[])

Log a message with the Info level.

void InfoFormat(string,Exception,params object[])

Log a message with the Info level.

void InfoFormat(string,params object[])

See Also

ILog Interface | Common.Logging Namespace


ILog.InfoFormat(IFormatProvider, String, Exception, Object) Method

Log a message with the Info level.

[Visual Basic]
Public Sub InfoFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
)
[C#]
void InfoFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
exception
The exception to log.
args

See Also

ILog Interface | Common.Logging Namespace | ILog.InfoFormat Overload List


ILog.InfoFormat(IFormatProvider, String, Object) Method

Log a message with the Info level.

[Visual Basic]
Public Sub InfoFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
void InfoFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
args

See Also

ILog Interface | Common.Logging Namespace | ILog.InfoFormat Overload List


ILog.InfoFormat(String, Exception, Object) Method

Log a message with the Info level.

[Visual Basic]
Public Sub InfoFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
)
[C#]
void InfoFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of format arguments

See Also

ILog Interface | Common.Logging Namespace | ILog.InfoFormat Overload List


ILog.InfoFormat(String, Object) Method

Log a message with the Info level.

[Visual Basic]
Public Sub InfoFormat( _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
void InfoFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args
the list of format arguments

See Also

ILog Interface | Common.Logging Namespace | ILog.InfoFormat Overload List


Trace Method

Common Logging 2.0 API Reference

ILog.Trace Method

Log a message with the Trace level using a callback to obtain the message

Overload List

Log a message with the Trace level using a callback to obtain the message

void Trace(Action<FormatMessageHandler>)

Log a message with the Trace level using a callback to obtain the message

void Trace(Action<FormatMessageHandler>,Exception)

Log a message with the Trace level using a callback to obtain the message

void Trace(IFormatProvider,Action<FormatMessageHandler>)

Log a message with the Trace level using a callback to obtain the message

void Trace(IFormatProvider,Action<FormatMessageHandler>,Exception)

Log a message object with the Trace level.

void Trace(object)

Log a message object with the Trace level including the stack trace of the Exception passed as a parameter.

void Trace(object,Exception)

See Also

ILog Interface | Common.Logging Namespace


ILog.Trace(Action) Method

Log a message with the Trace level using a callback to obtain the message

[Visual Basic]
Public Sub Trace( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
)
[C#]
void Trace(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Trace Overload List


ILog.Trace(Action, Exception) Method

Log a message with the Trace level using a callback to obtain the message

[Visual Basic]
Public Sub Trace( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
)
[C#]
void Trace(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack trace.

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Trace Overload List


ILog.Trace(IFormatProvider, Action) Method

Log a message with the Trace level using a callback to obtain the message

[Visual Basic]
Public Sub Trace( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
)
[C#]
void Trace(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Trace Overload List


ILog.Trace(IFormatProvider, Action, Exception) Method

Log a message with the Trace level using a callback to obtain the message

[Visual Basic]
Public Sub Trace( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
)
[C#]
void Trace(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack trace.

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Trace Overload List


ILog.Trace(Object) Method

Log a message object with the Trace level.

[Visual Basic]
Public Sub Trace( _
ByVal message As Object _
)
[C#]
void Trace(
object message
);

Parameters

message
The message object to log.

See Also

ILog Interface | Common.Logging Namespace | ILog.Trace Overload List


ILog.Trace(Object, Exception) Method

Log a message object with the Trace level including the stack trace of the Exception passed as a parameter.

[Visual Basic]
Public Sub Trace( _
ByVal message As Object, _
ByVal exception As Exception _
)
[C#]
void Trace(
object message,
Exception exception
);

Parameters

message
The message object to log.
exception
The exception to log, including its stack trace.

See Also

ILog Interface | Common.Logging Namespace | ILog.Trace Overload List


TraceFormat Method

Common Logging 2.0 API Reference

ILog.TraceFormat Method

Log a message with the Trace level.

Overload List

Log a message with the Trace level.

void TraceFormat(IFormatProvider,string,Exception,params object[])

Log a message with the Trace level.

void TraceFormat(IFormatProvider,string,params object[])

Log a message with the Trace level.

void TraceFormat(string,Exception,params object[])

Log a message with the Trace level.

void TraceFormat(string,params object[])

See Also

ILog Interface | Common.Logging Namespace


ILog.TraceFormat(IFormatProvider, String, Exception, Object) Method

Log a message with the Trace level.

[Visual Basic]
Public Sub TraceFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
)
[C#]
void TraceFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
exception
The exception to log.
args

See Also

ILog Interface | Common.Logging Namespace | ILog.TraceFormat Overload List


ILog.TraceFormat(IFormatProvider, String, Object) Method

Log a message with the Trace level.

[Visual Basic]
Public Sub TraceFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
void TraceFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
args

See Also

ILog Interface | Common.Logging Namespace | ILog.TraceFormat Overload List


ILog.TraceFormat(String, Exception, Object) Method

Log a message with the Trace level.

[Visual Basic]
Public Sub TraceFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
)
[C#]
void TraceFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of format arguments

See Also

ILog Interface | Common.Logging Namespace | ILog.TraceFormat Overload List


ILog.TraceFormat(String, Object) Method

Log a message with the Trace level.

[Visual Basic]
Public Sub TraceFormat( _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
void TraceFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args
the list of format arguments

See Also

ILog Interface | Common.Logging Namespace | ILog.TraceFormat Overload List


Warn Method

Common Logging 2.0 API Reference

ILog.Warn Method

Log a message with the Warn level using a callback to obtain the message

Overload List

Log a message with the Warn level using a callback to obtain the message

void Warn(Action<FormatMessageHandler>)

Log a message with the Warn level using a callback to obtain the message

void Warn(Action<FormatMessageHandler>,Exception)

Log a message with the Warn level using a callback to obtain the message

void Warn(IFormatProvider,Action<FormatMessageHandler>)

Log a message with the Warn level using a callback to obtain the message

void Warn(IFormatProvider,Action<FormatMessageHandler>,Exception)

Log a message object with the Warn level.

void Warn(object)

Log a message object with the Warn level including the stack trace of the Exception passed as a parameter.

void Warn(object,Exception)

See Also

ILog Interface | Common.Logging Namespace


ILog.Warn(Action) Method

Log a message with the Warn level using a callback to obtain the message

[Visual Basic]
Public Sub Warn( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
)
[C#]
void Warn(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Warn Overload List


ILog.Warn(Action, Exception) Method

Log a message with the Warn level using a callback to obtain the message

[Visual Basic]
Public Sub Warn( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
)
[C#]
void Warn(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack trace.

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Warn Overload List


ILog.Warn(IFormatProvider, Action) Method

Log a message with the Warn level using a callback to obtain the message

[Visual Basic]
Public Sub Warn( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
)
[C#]
void Warn(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Warn Overload List


ILog.Warn(IFormatProvider, Action, Exception) Method

Log a message with the Warn level using a callback to obtain the message

[Visual Basic]
Public Sub Warn( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
)
[C#]
void Warn(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Warn.

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

ILog Interface | Common.Logging Namespace | ILog.Warn Overload List


ILog.Warn(Object) Method

Log a message object with the Warn level.

[Visual Basic]
Public Sub Warn( _
ByVal message As Object _
)
[C#]
void Warn(
object message
);

Parameters

message
The message object to log.

See Also

ILog Interface | Common.Logging Namespace | ILog.Warn Overload List


ILog.Warn(Object, Exception) Method

Log a message object with the Warn level including the stack trace of the Exception passed as a parameter.

[Visual Basic]
Public Sub Warn( _
ByVal message As Object, _
ByVal exception As Exception _
)
[C#]
void Warn(
object message,
Exception exception
);

Parameters

message
The message object to log.
exception
The exception to log, including its stack trace.

See Also

ILog Interface | Common.Logging Namespace | ILog.Warn Overload List


WarnFormat Method

Common Logging 2.0 API Reference

ILog.WarnFormat Method

Log a message with the Warn level.

Overload List

Log a message with the Warn level.

void WarnFormat(IFormatProvider,string,Exception,params object[])

Log a message with the Warn level.

void WarnFormat(IFormatProvider,string,params object[])

Log a message with the Warn level.

void WarnFormat(string,Exception,params object[])

Log a message with the Warn level.

void WarnFormat(string,params object[])

See Also

ILog Interface | Common.Logging Namespace


ILog.WarnFormat(IFormatProvider, String, Exception, Object) Method

Log a message with the Warn level.

[Visual Basic]
Public Sub WarnFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
)
[C#]
void WarnFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
exception
The exception to log.
args

See Also

ILog Interface | Common.Logging Namespace | ILog.WarnFormat Overload List


ILog.WarnFormat(IFormatProvider, String, Object) Method

Log a message with the Warn level.

[Visual Basic]
Public Sub WarnFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
void WarnFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
args

See Also

ILog Interface | Common.Logging Namespace | ILog.WarnFormat Overload List


ILog.WarnFormat(String, Exception, Object) Method

Log a message with the Warn level.

[Visual Basic]
Public Sub WarnFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
)
[C#]
void WarnFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of format arguments

See Also

ILog Interface | Common.Logging Namespace | ILog.WarnFormat Overload List


ILog.WarnFormat(String, Object) Method

Log a message with the Warn level.

[Visual Basic]
Public Sub WarnFormat( _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
void WarnFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args
the list of format arguments

See Also

ILog Interface | Common.Logging Namespace | ILog.WarnFormat Overload List


ILoggerFactoryAdapter Interface

LoggerFactoryAdapter interface is used internally by LogManager Only developers wishing to write new Common.Logging adapters need to worry about this interface.

For a list of all members of this type, see ILoggerFactoryAdapter Members .

[Visual Basic]
Public Interface ILoggerFactoryAdapter
[C#]
public interface ILoggerFactoryAdapter

Types that implement ILoggerFactoryAdapter

Type | Description
EntLibLoggerFactoryAdapter | Adapts the EnterpriseLibrary 4.1 logging system to Common.Logging.
EntLibLoggerFactoryAdapter | Adapts the EnterpriseLibrary 3.1 logging system to Common.Logging.
AbstractCachingLoggerFactoryAdapter | An implementation of ILoggerFactoryAdapter that caches loggers handed out by this factory.
Log4NetLoggerFactoryAdapter | Concrete subclass of ILoggerFactoryAdapter specific to log4net 1.2.9.
Log4NetLoggerFactoryAdapter | Concrete subclass of ILoggerFactoryAdapter specific to log4net 1.2.10.
NLogLoggerFactoryAdapter | Concrete subclass of ILoggerFactoryAdapter specific to NLog 1.0.0.505.
AbstractSimpleLoggerFactoryAdapter | Base factory implementation for creating simple ILog instances.
CapturingLoggerFactoryAdapter | An adapter, who's loggers capture all log events and send them to AddEvent. Retrieve the list of log events from LoggerEvents.
ConsoleOutLoggerFactoryAdapter | Factory for creating ILog instances that write data to Out.
NoOpLoggerFactoryAdapter | Factory for creating ILog instances that silently ignores logging requests.
TraceLoggerFactoryAdapter | Factory for creating ILog instances that send everything to the Trace output stream.

Requirements

Namespace: Common.Logging

Assembly: Common.Logging (in Common.Logging.dll)

See Also

ILoggerFactoryAdapter Members | Common.Logging Namespace


ILoggerFactoryAdapter Members

ILoggerFactoryAdapter overview

Public Instance Methods

GetLogger Overloaded. Get a ILog instance by type.

See Also

ILoggerFactoryAdapter Interface | Common.Logging Namespace


ILoggerFactoryAdapter Methods

The methods of the ILoggerFactoryAdapter interface are listed below. For a complete list of ILoggerFactoryAdapter interface members, see the ILoggerFactoryAdapter Members topic.

Public Instance Methods

GetLogger Overloaded. Get a ILog instance by type.

See Also

ILoggerFactoryAdapter Interface | Common.Logging Namespace


GetLogger Method

Common Logging 2.0 API Reference

ILoggerFactoryAdapter.GetLogger Method

Get a ILog instance by name.

Overload List

Get a ILog instance by name.

ILog GetLogger(string)

Get a ILog instance by type.

ILog GetLogger(Type)

See Also

ILoggerFactoryAdapter Interface | Common.Logging Namespace


ILoggerFactoryAdapter.GetLogger(String) Method

Get a ILog instance by name.

[Visual Basic]
Public Sub GetLogger( _
ByVal name As String _
)
[C#]
ILog GetLogger(
string name
);

Parameters

name
The name of the logger

Return Value

See Also

ILoggerFactoryAdapter Interface | Common.Logging Namespace | ILoggerFactoryAdapter.GetLogger Overload List


ILoggerFactoryAdapter.GetLogger(Type) Method

Get a ILog instance by type.

[Visual Basic]
Public Sub GetLogger( _
ByVal type As Type _
)
[C#]
ILog GetLogger(
Type type
);

Parameters

type
The type to use for the logger

Return Value

See Also

ILoggerFactoryAdapter Interface | Common.Logging Namespace | ILoggerFactoryAdapter.GetLogger Overload List


LogLevel Enumeration

The 7 possible logging levels

[Visual Basic]
Public Enum LogLevel
[C#]
public enum LogLevel

Members

Member Name | Description
All | All logging levels
Trace | A trace logging level
Debug | A debug logging level
Info | A info logging level
Warn | A warn logging level
Error | An error logging level
Fatal | A fatal logging level
Off | Do not log anything.

Requirements

Namespace: Common.Logging

Assembly: Common.Logging (in Common.Logging.dll)

See Also

Common.Logging Namespace

Send comments on this topic.


LogManager Class

Use the LogManager's GetLogger or GetLogger methods to obtain ILog instances for logging.

For a list of all members of this type, see LogManager Members .

System.Object
LogManager

[Visual Basic]
Public Shared Class LogManager
[C#]
public static class LogManager

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

For configuring the underlying log system using application configuration, see the example at ConfigurationSectionHandler. For configuring programmatically, see the example section below.

Example

The example below shows the typical use of LogManager to obtain a reference to a logger and log an exception:

ILog log = LogManager.GetLogger(this.GetType());
...
try
{
  /* .... */
}
catch(Exception ex)
{
  log.ErrorFormat("Hi {0}", ex, "dude");
}
The example below shows programmatic configuration of the underlying log system:
// create properties
NameValueCollection properties = new NameValueCollection();
properties["showDateTime"] = "true";

// set Adapter
Common.Logging.LogManager.Adapter = new
Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter(properties);

Requirements

Namespace: Common.Logging

Assembly: Common.Logging (in Common.Logging.dll)

See Also

LogManager Members | Common.Logging Namespace | ILog | Adapter | ILoggerFactoryAdapter | ConfigurationSectionHandler


LogManager Members

LogManager overview

Public Static (Shared) Fields

COMMON_LOGGING_SECTION The name of the default configuration section to read settings from.

Public Static (Shared) Properties

Adapter | Gets or sets the adapter.
ConfigurationReader | Gets the configuration reader used to initialize the LogManager.

Public Static (Shared) Methods

GetCurrentClassLogger | Gets the logger by calling GetLogger on the currently configured Adapter using the type of the calling class.
GetLogger | Overloaded. Gets the logger by calling GetLogger on the currently configured Adapter using the specified type.
GetLogger(T) | Gets the logger by calling GetLogger on the currently configured Adapter using the specified type.
Reset | Overloaded. Reset the Common.Logging infrastructure to its default settings. This means, that configuration settings will be re-read from section <common/logging> of your app.config.

Public Instance Methods

Equals (inherited from Object)
GetHashCode (inherited from Object)
GetType (inherited from Object)
ToString (inherited from Object)

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

LogManager Class | Common.Logging Namespace | ILog | Adapter | ILoggerFactoryAdapter | ConfigurationSectionHandler


LogManager Fields

The fields of the LogManager class are listed below. For a complete list of LogManager class members, see the LogManager Members topic.

Public Static (Shared) Fields

COMMON_LOGGING_SECTION The name of the default configuration section to read settings from.

See Also

LogManager Class | Common.Logging Namespace | ILog | Adapter | ILoggerFactoryAdapter | ConfigurationSectionHandler


LogManager.COMMON_LOGGING_SECTION Field

The name of the default configuration section to read settings from.

[Visual Basic]
Public Shared ReadOnly COMMON_LOGGING_SECTION As String
[C#]
public static readonly string COMMON_LOGGING_SECTION;

Remarks

You can always change the source of your configuration settings by setting another IConfigurationReader instance on ConfigurationReader.

See Also

LogManager Class | Common.Logging Namespace


LogManager Properties

The properties of the LogManager class are listed below. For a complete list of LogManager class members, see the LogManager Members topic.

Public Static (Shared) Properties

Adapter | Gets or sets the adapter.
ConfigurationReader | Gets the configuration reader used to initialize the LogManager.

See Also

LogManager Class | Common.Logging Namespace | ILog | Adapter | ILoggerFactoryAdapter | ConfigurationSectionHandler


Adapter Property

Common Logging 2.0 API Reference

LogManager.Adapter Property

Gets or sets the adapter.

[Visual Basic]
Public Shared Property Adapter() As ILoggerFactoryAdapter
Public Get
End Get
Public Set
End Set
End Property
[C#]
public static ILoggerFactoryAdapter Adapter { public get; public set; }

Property Value

The adapter.

See Also

LogManager Class | Common.Logging Namespace


ConfigurationReader Property

Common Logging 2.0 API Reference

LogManager.ConfigurationReader Property

Gets the configuration reader used to initialize the LogManager.

[Visual Basic]
Public Shared ReadOnly Property ConfigurationReader() As IConfigurationReader
Public Get
End Get
End Property
[C#]
public static IConfigurationReader ConfigurationReader { public get; }

Property Value

The configuration reader.

Remarks

Primarily used for testing purposes but maybe useful to obtain configuration information from some place other than the .NET application configuration file.

See Also

LogManager Class | Common.Logging Namespace


LogManager Methods

The methods of the LogManager class are listed below. For a complete list of LogManager class members, see the LogManager Members topic.

Public Static (Shared) Methods

GetCurrentClassLogger | Gets the logger by calling GetLogger on the currently configured Adapter using the type of the calling class.
GetLogger | Overloaded. Gets the logger by calling GetLogger on the currently configured Adapter using the specified type.
GetLogger(T) | Gets the logger by calling GetLogger on the currently configured Adapter using the specified type.
Reset | Overloaded. Reset the Common.Logging infrastructure to its default settings. This means, that configuration settings will be re-read from section <common/logging> of your app.config.

Public Instance Methods

Equals (inherited from Object)
GetHashCode (inherited from Object)
GetType (inherited from Object)
ToString (inherited from Object)

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

LogManager Class | Common.Logging Namespace | ILog | Adapter | ILoggerFactoryAdapter | ConfigurationSectionHandler


LogManager.GetCurrentClassLogger Method

Gets the logger by calling GetLogger on the currently configured Adapter using the type of the calling class.

[Visual Basic]
Public Shared Sub GetCurrentClassLogger()
[C#]
public static ILog GetCurrentClassLogger();

Return Value

the logger instance obtained from the current Adapter

Remarks

This method needs to inspect the StackTrace in order to determine the calling class. This of course comes with a performance penalty, thus you shouldn't call it too often in your application.

See Also

LogManager Class | Common.Logging Namespace | GetLogger


GetLogger Method

Common Logging 2.0 API Reference

LogManager.GetLogger Method

Gets the logger by calling GetLogger on the currently configured Adapter using the specified name.

Overload List

Gets the logger by calling GetLogger on the currently configured Adapter using the specified name.

public static ILog GetLogger(string)

Gets the logger by calling GetLogger on the currently configured Adapter using the specified type.

public static ILog GetLogger(Type)

See Also

LogManager Class | Common.Logging Namespace


LogManager.GetLogger(String) Method

Gets the logger by calling GetLogger on the currently configured Adapter using the specified name.

[Visual Basic]
Public Overloads Shared Sub GetLogger( _
ByVal name As String _
)
[C#]
public static ILog GetLogger(
string name
);

Parameters

name
The name.

Return Value

the logger instance obtained from the current Adapter

See Also

LogManager Class | Common.Logging Namespace | LogManager.GetLogger Overload List


LogManager.GetLogger(Type) Method

Gets the logger by calling GetLogger on the currently configured Adapter using the specified type.

[Visual Basic]
Public Overloads Shared Sub GetLogger( _
ByVal type As Type _
)
[C#]
public static ILog GetLogger(
Type type
);

Parameters

type
The type.

Return Value

the logger instance obtained from the current Adapter

See Also

LogManager Class | Common.Logging Namespace | LogManager.GetLogger Overload List


LogManager.GetLogger(T) Method

Gets the logger by calling GetLogger on the currently configured Adapter using the specified type.

[Visual Basic]
Public Shared Sub GetLogger(Of T)()
[C#]
public static ILog GetLogger<T>();

Return Value

the logger instance obtained from the current Adapter

See Also

LogManager Class | Common.Logging Namespace


Reset Method

Common Logging 2.0 API Reference

LogManager.Reset Method

Reset the Common.Logging infrastructure to its default settings. This means, that configuration settings will be re-read from section <common/logging> of your app.config.

Overload List

Reset the Common.Logging infrastructure to its default settings. This means, that configuration settings will be re-read from section <common/logging> of your app.config.

public static void Reset()

Reset the Common.Logging infrastructure to its default settings. This means, that configuration settings will be re-read from section <common/logging> of your app.config.

public static void Reset(IConfigurationReader)

See Also

LogManager Class | Common.Logging Namespace


LogManager.Reset() Method

Reset the Common.Logging infrastructure to its default settings. This means, that configuration settings will be re-read from section <common/logging> of your app.config.

[Visual Basic]
Public Overloads Shared Sub Reset()
[C#]
public static void Reset();

Remarks

This is mainly used for unit testing, you wouldn't normally use this in your applications.
Note: ILog instances already handed out from this LogManager are not(!) affected. Resetting LogManager only affects new instances being handed out.

See Also

LogManager Class | Common.Logging Namespace | LogManager.Reset Overload List


LogManager.Reset(IConfigurationReader) Method

Reset the Common.Logging infrastructure to its default settings. This means, that configuration settings will be re-read from section <common/logging> of your app.config.

[Visual Basic]
Public Overloads Shared Sub Reset( _
ByVal reader As IConfigurationReader _
)
[C#]
public static void Reset(
IConfigurationReader reader
);

Parameters

reader
the IConfigurationReader instance to obtain settings for re-initializing the LogManager.

Remarks

This is mainly used for unit testing, you wouldn't normally use this in your applications.
Note: ILog instances already handed out from this LogManager are not(!) affected. Resetting LogManager only affects new instances being handed out.

See Also

LogManager Class | Common.Logging Namespace | LogManager.Reset Overload List


Common.Logging.Configuration

Common Logging 2.0 API Reference

Common.Logging.Configuration Namespace

This namespace contains various utility classes.

Namespace Hierarchy

Classes

Class | Description
ArgUtils | Various utility methods for using during factory and logger instance configuration
DefaultConfigurationReader | Implementation of IConfigurationReader that uses the standard .NET configuration APIs, ConfigurationSettings in 1.x and ConfigurationManager in 2.0
LogSetting | Container used to hold configuration information from config file.

Delegates

Delegate | Description
ArgUtils.Action | An anonymous action delegate with no arguments and no return value.
ArgUtils.Function(T) | An anonymous action delegate with no arguments and no return value.
ArgUtils.ParseHandler(T) | A delegate converting a string representation into the target type


ArgUtils Class

Various utility methods for using during factory and logger instance configuration

For a list of all members of this type, see ArgUtils Members .

System.Object
ArgUtils

[Visual Basic]
Public Shared Class ArgUtils
[C#]
public static class ArgUtils

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.Configuration

Assembly: Common.Logging (in Common.Logging.dll)

See Also

ArgUtils Members | Common.Logging.Configuration Namespace


ArgUtils Members

ArgUtils overview

Public Static (Shared) Methods

AssertIsAssignable(T) | Overloaded. Throws a ArgumentOutOfRangeException if an object of type valType is not assignable to type .
AssertNotNull(T) | Overloaded. Throws a ArgumentNullException if val is null.
Coalesce | Returns the first nonnull, nonempty value among its arguments.
Coalesce(T) | Returns the first nonnull, nonempty value among its arguments.
GetValue | Overloaded. Retrieves the named value from the specified NameValueCollection.
Guard | Ensures any exception thrown by the given action is wrapped with an ConfigurationException.
Guard(T) | Ensures any exception thrown by the given function is wrapped with an ConfigurationException.
RegisterTypeParser(T) | Adds the parser to the list of known type parsers.
TryParse(T) | Tries parsing stringValue into the specified return type.
TryParseEnum(T) | Tries parsing stringValue into an enum of the type of defaultValue.

Public Instance Methods

Equals (inherited from Object)
GetHashCode (inherited from Object)
GetType (inherited from Object)
ToString (inherited from Object)

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

ArgUtils Class | Common.Logging.Configuration Namespace


ArgUtils Methods

The methods of the ArgUtils class are listed below. For a complete list of ArgUtils class members, see the ArgUtils Members topic.

Public Static (Shared) Methods

AssertIsAssignable(T) | Overloaded. Throws a ArgumentOutOfRangeException if an object of type valType is not assignable to type .
AssertNotNull(T) | Overloaded. Throws a ArgumentNullException if val is null.
Coalesce | Returns the first nonnull, nonempty value among its arguments.
Coalesce(T) | Returns the first nonnull, nonempty value among its arguments.
GetValue | Overloaded. Retrieves the named value from the specified NameValueCollection.
Guard | Ensures any exception thrown by the given action is wrapped with an ConfigurationException.
Guard(T) | Ensures any exception thrown by the given function is wrapped with an ConfigurationException.
RegisterTypeParser(T) | Adds the parser to the list of known type parsers.
TryParse(T) | Tries parsing stringValue into the specified return type.
TryParseEnum(T) | Tries parsing stringValue into an enum of the type of defaultValue.

Public Instance Methods

Equals (inherited from Object)
GetHashCode (inherited from Object)
GetType (inherited from Object)
ToString (inherited from Object)

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

ArgUtils Class | Common.Logging.Configuration Namespace


AssertIsAssignable(T) Method

Common Logging 2.0 API Reference

ArgUtils.AssertIsAssignable(T) Method

Throws a ArgumentOutOfRangeException if an object of type valType is not assignable to type .

Overload List

Throws a ArgumentOutOfRangeException if an object of type valType is not assignable to type .

public static Type AssertIsAssignable(T)(string,Type)

Throws a ArgumentOutOfRangeException if an object of type valType is not assignable to type .

public static Type AssertIsAssignable(T)(string,Type,string,params object[])

See Also

ArgUtils Class | Common.Logging.Configuration Namespace


ArgUtils.AssertIsAssignable(T)(String, Type) Method

Throws a ArgumentOutOfRangeException if an object of type valType is not assignable to type .

[Visual Basic]
Public Overloads Shared Sub AssertIsAssignable(Of T)( _
ByVal paramName As String, _
ByVal valType As Type _
)
[C#]
public static Type AssertIsAssignable<T>(
string paramName,
Type valType
);

See Also

ArgUtils Class | Common.Logging.Configuration Namespace | ArgUtils.AssertIsAssignable(T) Overload List


ArgUtils.AssertIsAssignable(T)(String, Type, String, Object) Method

Throws a ArgumentOutOfRangeException if an object of type valType is not assignable to type .

[Visual Basic]
Public Overloads Shared Sub AssertIsAssignable(Of T)( _
ByVal paramName As String, _
ByVal valType As Type, _
ByVal messageFormat As String, _
ParamArray args As Object _
)
[C#]
public static Type AssertIsAssignable<T>(
string paramName,
Type valType,
string messageFormat,
params object[] args
);

See Also

ArgUtils Class | Common.Logging.Configuration Namespace | ArgUtils.AssertIsAssignable(T) Overload List


AssertNotNull(T) Method

Common Logging 2.0 API Reference

ArgUtils.AssertNotNull(T) Method

Throws a ArgumentNullException if val is null.

Overload List

Throws a ArgumentNullException if val is null.

public static T AssertNotNull(T)(string,T)

Throws a ArgumentNullException if val is null.

public static T AssertNotNull(T)(string,T,string,params object[])

See Also

ArgUtils Class | Common.Logging.Configuration Namespace


ArgUtils.AssertNotNull(T)(String, T) Method

Throws a ArgumentNullException if val is null.

[Visual Basic]
Public Overloads Shared Sub AssertNotNull(Of T As Class)( _
ByVal paramName As String, _
ByVal val As T _
)
[C#]
public static T AssertNotNull<T>(
string paramName,
T val
)
where T : class;

See Also

ArgUtils Class | Common.Logging.Configuration Namespace | ArgUtils.AssertNotNull(T) Overload List


ArgUtils.AssertNotNull(T)(String, T, String, Object) Method

Throws a ArgumentNullException if val is null.

[Visual Basic]
Public Overloads Shared Sub AssertNotNull(Of T As Class)( _
ByVal paramName As String, _
ByVal val As T, _
ByVal messageFormat As String, _
ParamArray args As Object _
)
[C#]
public static T AssertNotNull<T>(
string paramName,
T val,
string messageFormat,
params object[] args
)
where T : class;

See Also

ArgUtils Class | Common.Logging.Configuration Namespace | ArgUtils.AssertNotNull(T) Overload List


ArgUtils.Coalesce Method

Returns the first nonnull, nonempty value among its arguments.

[Visual Basic]
Public Shared Sub Coalesce( _
ParamArray values As String _
)
[C#]
public static string Coalesce(
params string[] values
);

Remarks

Returns null, if the initial list was null or empty.

See Also

ArgUtils Class | Common.Logging.Configuration Namespace | Coalesce(T)


ArgUtils.Coalesce(T) Method

Returns the first nonnull, nonempty value among its arguments.

[Visual Basic]
Public Shared Sub Coalesce(Of T As Class)( _
ByVal predicate As Predicate(Of T), _
ParamArray values As T _
)
[C#]
public static T Coalesce<T>(
Predicate<T> predicate,
params T[] values
)
where T : class;

Remarks

Also

See Also

ArgUtils Class | Common.Logging.Configuration Namespace


GetValue Method

Common Logging 2.0 API Reference

ArgUtils.GetValue Method

Retrieves the named value from the specified NameValueCollection.

Overload List

Retrieves the named value from the specified NameValueCollection.

public static string GetValue(NameValueCollection,string)

Retrieves the named value from the specified NameValueCollection.

public static string GetValue(NameValueCollection,string,string)

See Also

ArgUtils Class | Common.Logging.Configuration Namespace


ArgUtils.GetValue(NameValueCollection, String) Method

Retrieves the named value from the specified NameValueCollection.

[Visual Basic]
Public Overloads Shared Sub GetValue( _
ByVal values As NameValueCollection, _
ByVal name As String _
)
[C#]
public static string GetValue(
NameValueCollection values,
string name
);

Parameters

values
may be null
name
the value's key

Return Value

if values is not null, the value returned by values[name]. null otherwise.

See Also

ArgUtils Class | Common.Logging.Configuration Namespace | ArgUtils.GetValue Overload List


ArgUtils.GetValue(NameValueCollection, String, String) Method

Retrieves the named value from the specified NameValueCollection.

[Visual Basic]
Public Overloads Shared Sub GetValue( _
ByVal values As NameValueCollection, _
ByVal name As String, _
ByVal defaultValue As String _
)
[C#]
public static string GetValue(
NameValueCollection values,
string name,
string defaultValue
);

Parameters

values
may be null
name
the value's key
defaultValue
the default value, if not found

Return Value

if values is not null, the value returned by values[name]. null otherwise.

See Also

ArgUtils Class | Common.Logging.Configuration Namespace | ArgUtils.GetValue Overload List


ArgUtils.Guard Method

Ensures any exception thrown by the given action is wrapped with an ConfigurationException.

[Visual Basic]
Public Shared Sub Guard( _
ByVal action As Action, _
ByVal messageFormat As String, _
ParamArray args As Object _
)
[C#]
public static void Guard(
Action action,
string messageFormat,
params object[] args
);

Parameters

action
the action to execute
messageFormat
the message to be set on the thrown ConfigurationException
args
args to be passed to Format to format the message

Remarks

If action already throws a ConfigurationException, it will not be wrapped.

See Also

ArgUtils Class | Common.Logging.Configuration Namespace


ArgUtils.Guard(T) Method

Ensures any exception thrown by the given function is wrapped with an ConfigurationException.

[Visual Basic]
Public Shared Sub Guard(Of T)( _
ByVal function As Function(Of T), _
ByVal messageFormat As String, _
ParamArray args As Object _
)
[C#]
public static T Guard<T>(
Function<T> function,
string messageFormat,
params object[] args
);

Parameters

function
the action to execute
messageFormat
the message to be set on the thrown ConfigurationException
args
args to be passed to Format to format the message

Remarks

If function already throws a ConfigurationException, it will not be wrapped.

See Also

ArgUtils Class | Common.Logging.Configuration Namespace


ArgUtils.RegisterTypeParser(T) Method

Adds the parser to the list of known type parsers.

[Visual Basic]
Public Shared Sub RegisterTypeParser(Of T)( _
ByVal parser As ParseHandler(Of T) _
)
[C#]
public static void RegisterTypeParser<T>(
ParseHandler<T> parser
);

Remarks

.NET intrinsic types are pre-registerd: short, int, long, float, double, decimal, bool

See Also

ArgUtils Class | Common.Logging.Configuration Namespace


ArgUtils.TryParse(T) Method

Tries parsing stringValue into the specified return type.

[Visual Basic]
Public Shared Sub TryParse(Of T)( _
ByVal defaultValue As T, _
ByVal stringValue As String _
)
[C#]
public static T TryParse<T>(
T defaultValue,
string stringValue
);

Parameters

defaultValue
the default value to return if parsing fails
stringValue
the string value to parse

Return Value

the successfully parsed value, defaultValue otherwise.

See Also

ArgUtils Class | Common.Logging.Configuration Namespace


ArgUtils.TryParseEnum(T) Method

Tries parsing stringValue into an enum of the type of defaultValue.

[Visual Basic]
Public Shared Sub TryParseEnum(Of T As {Structure, ValueType})( _
ByVal defaultValue As T, _
ByVal stringValue As String _
)
[C#]
public static T TryParseEnum<T>(
T defaultValue,
string stringValue
)
where T : struct, ValueType;

Parameters

defaultValue
the default value to return if parsing fails
stringValue
the string value to parse

Return Value

the successfully parsed value, defaultValue otherwise.

See Also

ArgUtils Class | Common.Logging.Configuration Namespace


ArgUtils.Action Delegate

An anonymous action delegate with no arguments and no return value.

[Visual Basic]
Public Delegate Function Action()
[C#]
public delegate void Action();

Requirements

Namespace: Common.Logging.Configuration

Assembly: Common.Logging (in Common.Logging.dll)

See Also

Common.Logging.Configuration Namespace | Guard


ArgUtils.Function(T) Delegate

An anonymous action delegate with no arguments and no return value.

[Visual Basic]
Public Delegate Function Function(Of T)()
[C#]
public delegate T Function<T>();

Requirements

Namespace: Common.Logging.Configuration

Assembly: Common.Logging (in Common.Logging.dll)

See Also

Common.Logging.Configuration Namespace | Guard(T)


ArgUtils.ParseHandler(T) Delegate

A delegate converting a string representation into the target type

[Visual Basic]
Public Delegate Function ParseHandler(Of T)( _
ByVal strValue As String _
)
[C#]
public delegate T ParseHandler<T>(
string strValue
);

Requirements

Namespace: Common.Logging.Configuration

Assembly: Common.Logging (in Common.Logging.dll)

See Also

Common.Logging.Configuration Namespace

Send comments on this topic.


DefaultConfigurationReader Class

Implementation of IConfigurationReader that uses the standard .NET configuration APIs, ConfigurationSettings in 1.x and ConfigurationManager in 2.0

For a list of all members of this type, see DefaultConfigurationReader Members .

System.Object
DefaultConfigurationReader

[Visual Basic]
Public Class DefaultConfigurationReader
Implements IConfigurationReader
[C#]
public class DefaultConfigurationReader : IConfigurationReader

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.Configuration

Assembly: Common.Logging (in Common.Logging.dll)

See Also

DefaultConfigurationReader Members | Common.Logging.Configuration Namespace


DefaultConfigurationReader Members

DefaultConfigurationReader overview

Public Instance Constructors

DefaultConfigurationReader Constructor Initializes a new instance of the DefaultConfigurationReader class.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetSection | Parses the configuration section and returns the resulting object.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

DefaultConfigurationReader Class | Common.Logging.Configuration Namespace


DefaultConfigurationReader Constructor

Initializes a new instance of the DefaultConfigurationReader class.

[Visual Basic]
Public Sub New()
[C#]
DefaultConfigurationReader();

See Also

DefaultConfigurationReader Class | Common.Logging.Configuration Namespace


DefaultConfigurationReader Methods

The methods of the DefaultConfigurationReader class are listed below. For a complete list of DefaultConfigurationReader class members, see the DefaultConfigurationReader Members topic.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetSection | Parses the configuration section and returns the resulting object.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

DefaultConfigurationReader Class | Common.Logging.Configuration Namespace


DefaultConfigurationReader.GetSection Method

Parses the configuration section and returns the resulting object.

[Visual Basic]
Public NotOverridable Sub GetSection( _
ByVal sectionName As String _
) _
Implements IConfigurationReader.GetSection
[C#]
public object GetSection(
string sectionName
);

Parameters

sectionName
Name of the configuration section.

Return Value

Object created by a corresponding IConfigurationSectionHandler.

Implements

IConfigurationReader.GetSection

Remarks

Primary purpose of this method is to allow us to parse and load configuration sections using the same API regardless of the .NET framework version.

See Also

DefaultConfigurationReader Class | Common.Logging.Configuration Namespace


LogSetting Class

Container used to hold configuration information from config file.

For a list of all members of this type, see LogSetting Members .

System.Object
LogSetting

[Visual Basic]
Public Class LogSetting
[C#]
public class LogSetting

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.Configuration

Assembly: Common.Logging (in Common.Logging.dll)

See Also

LogSetting Members | Common.Logging.Configuration Namespace


LogSetting Members

LogSetting overview

Public Instance Constructors

LogSetting Constructor Missing <summary> documentation for M:Common.Logging.Configuration.LogSetting.#ctor(System.Type,System.Collections.Specialized.NameValueCollection)

Public Instance Properties

FactoryAdapterType | The ILoggerFactoryAdapter type that will be used for creating ILog instances.
Properties | Additional user supplied properties that are passed to the FactoryAdapterType's constructor.

Public Instance Methods

Equals (inherited from Object)
GetHashCode (inherited from Object)
GetType (inherited from Object)
ToString (inherited from Object)

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

LogSetting Class | Common.Logging.Configuration Namespace


LogSetting Constructor

Missing <summary> documentation for M:Common.Logging.Configuration.LogSetting.#ctor(System.Type,System.Collections.Specialized.NameValueCollection)

[Visual Basic]
Public Sub New( _
ByVal factoryAdapterType As Type, _
ByVal properties As NameValueCollection _
)
[C#]
LogSetting(
Type factoryAdapterType,
NameValueCollection properties
);

Parameters

factoryAdapterType
The ILoggerFactoryAdapter type that will be used for creating ILog
properties
Additional user supplied properties that are passed to the factoryAdapterType's constructor.

See Also

LogSetting Class | Common.Logging.Configuration Namespace


LogSetting Properties

The properties of the LogSetting class are listed below. For a complete list of LogSetting class members, see the LogSetting Members topic.

Public Instance Properties

FactoryAdapterType | The ILoggerFactoryAdapter type that will be used for creating ILog instances.
Properties | Additional user supplied properties that are passed to the FactoryAdapterType's constructor.

See Also

LogSetting Class | Common.Logging.Configuration Namespace


FactoryAdapterType Property

Common Logging 2.0 API Reference

LogSetting.FactoryAdapterType Property

The ILoggerFactoryAdapter type that will be used for creating ILog instances.

[Visual Basic]
Public ReadOnly Property FactoryAdapterType() As Type
Public Get
End Get
End Property
[C#]
public Type FactoryAdapterType { public get; }

See Also

LogSetting Class | Common.Logging.Configuration Namespace


Properties Property

Common Logging 2.0 API Reference

LogSetting.Properties Property

Additional user supplied properties that are passed to the FactoryAdapterType's constructor.

[Visual Basic]
Public ReadOnly Property Properties() As NameValueCollection
Public Get
End Get
End Property
[C#]
public NameValueCollection Properties { public get; }

See Also

LogSetting Class | Common.Logging.Configuration Namespace


Common.Logging.Factory

Common Logging 2.0 API Reference

Common.Logging.Factory Namespace

This namespace contains convenience base classes for implementing your own ILoggerFactoryAdapters.

Namespace Hierarchy

Classes

Class | Description
AbstractCachingLoggerFactoryAdapter | An implementation of ILoggerFactoryAdapter that caches loggers handed out by this factory.
AbstractLogger | Provides base implementation common for most logger adapters

Delegates

Delegate | Description
AbstractLogger.WriteHandler | Represents a method responsible for writing a message to the log system.


AbstractCachingLoggerFactoryAdapter Class

An implementation of ILoggerFactoryAdapter that caches loggers handed out by this factory.

For a list of all members of this type, see AbstractCachingLoggerFactoryAdapter Members .

System.Object
AbstractCachingLoggerFactoryAdapter
Derived types

[Visual Basic]
Public MustInherit Class AbstractCachingLoggerFactoryAdapter
Implements ILoggerFactoryAdapter
[C#]
public abstract class AbstractCachingLoggerFactoryAdapter : ILoggerFactoryAdapter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Implementors just need to override CreateLogger.

Requirements

Namespace: Common.Logging.Factory

Assembly: Common.Logging (in Common.Logging.dll)

See Also

AbstractCachingLoggerFactoryAdapter Members | Common.Logging.Factory Namespace


AbstractCachingLoggerFactoryAdapter Members

AbstractCachingLoggerFactoryAdapter overview

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Constructors

AbstractCachingLoggerFactoryAdapter Constructor Creates a new

Protected Instance Methods

ClearLoggerCache | Purges all loggers from cache
CreateLogger | Create the specified named logger instance
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

AbstractCachingLoggerFactoryAdapter Class | Common.Logging.Factory Namespace


AbstractCachingLoggerFactoryAdapter Constructor

Creates a new

[Visual Basic]
Protected Sub New( _
ByVal caseSensitiveLoggerCache As Boolean _
)
[C#]
AbstractCachingLoggerFactoryAdapter(
bool caseSensitiveLoggerCache
);

Parameters

caseSensitiveLoggerCache

See Also

AbstractCachingLoggerFactoryAdapter Class | Common.Logging.Factory Namespace


AbstractCachingLoggerFactoryAdapter Methods

The methods of the AbstractCachingLoggerFactoryAdapter class are listed below. For a complete list of AbstractCachingLoggerFactoryAdapter class members, see the AbstractCachingLoggerFactoryAdapter Members topic.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

ClearLoggerCache | Purges all loggers from cache
CreateLogger | Create the specified named logger instance
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

AbstractCachingLoggerFactoryAdapter Class | Common.Logging.Factory Namespace


AbstractCachingLoggerFactoryAdapter.ClearLoggerCache Method

Purges all loggers from cache

[Visual Basic]
Protected Sub ClearLoggerCache()
[C#]
protected void ClearLoggerCache();

See Also

AbstractCachingLoggerFactoryAdapter Class | Common.Logging.Factory Namespace


AbstractCachingLoggerFactoryAdapter.CreateLogger Method

Create the specified named logger instance

[Visual Basic]
Protected MustOverride Sub CreateLogger( _
ByVal name As String _
)
[C#]
protected abstract ILog CreateLogger(
string name
);

Remarks

Derived factories need to implement this method to create the actual logger instance.

See Also

AbstractCachingLoggerFactoryAdapter Class | Common.Logging.Factory Namespace


GetLogger Method

Common Logging 2.0 API Reference

AbstractCachingLoggerFactoryAdapter.GetLogger Method

Get a ILog instance by name.

Overload List

Get a ILog instance by name.

public ILog GetLogger(string)

Get a ILog instance by Type.

public ILog GetLogger(Type)

See Also

AbstractCachingLoggerFactoryAdapter Class | Common.Logging.Factory Namespace


AbstractCachingLoggerFactoryAdapter.GetLogger(String) Method

Get a ILog instance by name.

[Visual Basic]
Public NotOverridable Overloads Sub GetLogger( _
ByVal name As String _
) _
Implements ILoggerFactoryAdapter.GetLogger
[C#]
public ILog GetLogger(
string name
);

Parameters

name
Usually a Type's Name or FullName property.

Return Value

An ILog instance either obtained from the internal cache or created by a call to CreateLogger.

Implements

ILoggerFactoryAdapter.GetLogger

See Also

AbstractCachingLoggerFactoryAdapter Class | Common.Logging.Factory Namespace | AbstractCachingLoggerFactoryAdapter.GetLogger Overload List


AbstractCachingLoggerFactoryAdapter.GetLogger(Type) Method

Get a ILog instance by Type.

[Visual Basic]
Public NotOverridable Overloads Sub GetLogger( _
ByVal type As Type _
) _
Implements ILoggerFactoryAdapter.GetLogger
[C#]
public ILog GetLogger(
Type type
);

Parameters

type
Usually the Type of the current class.

Return Value

An ILog instance either obtained from the internal cache or created by a call to CreateLogger.

Implements

ILoggerFactoryAdapter.GetLogger

See Also

AbstractCachingLoggerFactoryAdapter Class | Common.Logging.Factory Namespace | AbstractCachingLoggerFactoryAdapter.GetLogger Overload List


AbstractLogger Class

Provides base implementation common for most logger adapters

For a list of all members of this type, see AbstractLogger Members .

System.Object
AbstractLogger
Derived types

[Visual Basic]
<Serializable> _
Public MustInherit Class AbstractLogger
Implements ILog
[C#]
[Serializable]
public abstract class AbstractLogger : ILog

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.Factory

Assembly: Common.Logging (in Common.Logging.dll)

See Also

AbstractLogger Members | Common.Logging.Factory Namespace


AbstractLogger Members

AbstractLogger overview

Public Instance Properties

IsDebugEnabled | Checks if this logger is enabled for the Debug level.
IsErrorEnabled | Checks if this logger is enabled for the Error level.
IsFatalEnabled | Checks if this logger is enabled for the Fatal level.
IsInfoEnabled | Checks if this logger is enabled for the Info level.
IsTraceEnabled | Checks if this logger is enabled for the Trace level.
IsWarnEnabled | Checks if this logger is enabled for the Warn level.

Public Instance Methods

Debug | Overloaded. Log a message object with the Debug level.
DebugFormat | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error | Overloaded. Log a message object with the Error level.
ErrorFormat | Overloaded. Log a message with the Error level.
Fatal | Overloaded. Log a message object with the Fatal level.
FatalFormat | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info | Overloaded. Log a message object with the Info level.
InfoFormat | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace | Overloaded. Log a message object with the Trace level.
TraceFormat | Overloaded. Log a message with the Trace level.
Warn | Overloaded. Log a message object with the Warn level.
WarnFormat | Overloaded. Log a message with the Warn level.

Protected Instance Constructors

AbstractLogger Constructor Creates a new logger instance using WriteInternal for writing log events to the underlying log system.

Protected Instance Methods

Finalize (inherited from Object) |
GetWriteHandler | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
MemberwiseClone (inherited from Object) |
WriteInternal | Actually sends the message to the underlying log system.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


AbstractLogger Constructor

Creates a new logger instance using WriteInternal for writing log events to the underlying log system.

[Visual Basic]
Protected Sub New()
[C#]
AbstractLogger();

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | GetWriteHandler


AbstractLogger Properties

The properties of the AbstractLogger class are listed below. For a complete list of AbstractLogger class members, see the AbstractLogger Members topic.

Public Instance Properties

IsDebugEnabled | Checks if this logger is enabled for the Debug level.
IsErrorEnabled | Checks if this logger is enabled for the Error level.
IsFatalEnabled | Checks if this logger is enabled for the Fatal level.
IsInfoEnabled | Checks if this logger is enabled for the Info level.
IsTraceEnabled | Checks if this logger is enabled for the Trace level.
IsWarnEnabled | Checks if this logger is enabled for the Warn level.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


IsDebugEnabled Property

Common Logging 2.0 API Reference

AbstractLogger.IsDebugEnabled Property

Checks if this logger is enabled for the Debug level.

[Visual Basic]
Public MustOverride ReadOnly Property IsDebugEnabled() As Boolean _
Implements ILog.IsDebugEnabled

Public Get
End Get
End Property
[C#]
public abstract bool IsDebugEnabled { public get; }

Implements

ILog.IsDebugEnabled

Remarks

Override this in your derived class to comply with the underlying logging system

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


IsErrorEnabled Property

Common Logging 2.0 API Reference

AbstractLogger.IsErrorEnabled Property

Checks if this logger is enabled for the Error level.

[Visual Basic]
Public MustOverride ReadOnly Property IsErrorEnabled() As Boolean _
Implements ILog.IsErrorEnabled

Public Get
End Get
End Property
[C#]
public abstract bool IsErrorEnabled { public get; }

Implements

ILog.IsErrorEnabled

Remarks

Override this in your derived class to comply with the underlying logging system

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


IsFatalEnabled Property

Common Logging 2.0 API Reference

AbstractLogger.IsFatalEnabled Property

Checks if this logger is enabled for the Fatal level.

[Visual Basic]
Public MustOverride ReadOnly Property IsFatalEnabled() As Boolean _
Implements ILog.IsFatalEnabled

Public Get
End Get
End Property
[C#]
public abstract bool IsFatalEnabled { public get; }

Implements

ILog.IsFatalEnabled

Remarks

Override this in your derived class to comply with the underlying logging system

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


IsInfoEnabled Property

Common Logging 2.0 API Reference

AbstractLogger.IsInfoEnabled Property

Checks if this logger is enabled for the Info level.

[Visual Basic]
Public MustOverride ReadOnly Property IsInfoEnabled() As Boolean _
Implements ILog.IsInfoEnabled

Public Get
End Get
End Property
[C#]
public abstract bool IsInfoEnabled { public get; }

Implements

ILog.IsInfoEnabled

Remarks

Override this in your derived class to comply with the underlying logging system

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


IsTraceEnabled Property

Common Logging 2.0 API Reference

AbstractLogger.IsTraceEnabled Property

Checks if this logger is enabled for the Trace level.

[Visual Basic]
Public MustOverride ReadOnly Property IsTraceEnabled() As Boolean _
Implements ILog.IsTraceEnabled

Public Get
End Get
End Property
[C#]
public abstract bool IsTraceEnabled { public get; }

Implements

ILog.IsTraceEnabled

Remarks

Override this in your derived class to comply with the underlying logging system

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


IsWarnEnabled Property

Common Logging 2.0 API Reference

AbstractLogger.IsWarnEnabled Property

Checks if this logger is enabled for the Warn level.

[Visual Basic]
Public MustOverride ReadOnly Property IsWarnEnabled() As Boolean _
Implements ILog.IsWarnEnabled

Public Get
End Get
End Property
[C#]
public abstract bool IsWarnEnabled { public get; }

Implements

ILog.IsWarnEnabled

Remarks

Override this in your derived class to comply with the underlying logging system

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


AbstractLogger Methods

The methods of the AbstractLogger class are listed below. For a complete list of AbstractLogger class members, see the AbstractLogger Members topic.

Public Instance Methods

Debug | Overloaded. Log a message object with the Debug level.
DebugFormat | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error | Overloaded. Log a message object with the Error level.
ErrorFormat | Overloaded. Log a message with the Error level.
Fatal | Overloaded. Log a message object with the Fatal level.
FatalFormat | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info | Overloaded. Log a message object with the Info level.
InfoFormat | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace | Overloaded. Log a message object with the Trace level.
TraceFormat | Overloaded. Log a message with the Trace level.
Warn | Overloaded. Log a message object with the Warn level.
WarnFormat | Overloaded. Log a message with the Warn level.

Protected Instance Methods

Finalize (inherited from Object) |
GetWriteHandler | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
MemberwiseClone (inherited from Object) |
WriteInternal | Actually sends the message to the underlying log system.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


Debug Method

Common Logging 2.0 API Reference

AbstractLogger.Debug Method

Log a message with the Debug level using a callback to obtain the message

Overload List

Log a message with the Debug level using a callback to obtain the message

public virtual void Debug(Action<FormatMessageHandler>)

Log a message with the Debug level using a callback to obtain the message

public virtual void Debug(Action<FormatMessageHandler>,Exception)

Log a message with the Debug level using a callback to obtain the message

public virtual void Debug(IFormatProvider,Action<FormatMessageHandler>)

Log a message with the Debug level using a callback to obtain the message

public virtual void Debug(IFormatProvider,Action<FormatMessageHandler>,Exception)

Log a message object with the Debug level.

public virtual void Debug(object)

Log a message object with the Debug level including the stack Debug of the Exception passed as a parameter.

public virtual void Debug(object,Exception)

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


AbstractLogger.Debug(Action) Method

Log a message with the Debug level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Debug( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Debug
[C#]
public virtual void Debug(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Debug

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Debug Overload List


AbstractLogger.Debug(Action, Exception) Method

Log a message with the Debug level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Debug( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Debug
[C#]
public virtual void Debug(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Debug.

Implements

ILog.Debug

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Debug Overload List


AbstractLogger.Debug(IFormatProvider, Action) Method

Log a message with the Debug level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Debug( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Debug
[C#]
public virtual void Debug(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Debug

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Debug Overload List


AbstractLogger.Debug(IFormatProvider, Action, Exception) Method

Log a message with the Debug level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Debug( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Debug
[C#]
public virtual void Debug(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Debug.

Implements

ILog.Debug

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Debug Overload List


AbstractLogger.Debug(Object) Method

Log a message object with the Debug level.

[Visual Basic]
Public Overridable Overloads Sub Debug( _
ByVal message As Object _
) _
Implements ILog.Debug
[C#]
public virtual void Debug(
object message
);

Parameters

message
The message object to log.

Implements

ILog.Debug

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Debug Overload List


AbstractLogger.Debug(Object, Exception) Method

Log a message object with the Debug level including the stack Debug of the Exception passed as a parameter.

[Visual Basic]
Public Overridable Overloads Sub Debug( _
ByVal message As Object, _
ByVal exception As Exception _
) _
Implements ILog.Debug
[C#]
public virtual void Debug(
object message,
Exception exception
);

Parameters

message
The message object to log.
exception
The exception to log, including its stack Debug.

Implements

ILog.Debug

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Debug Overload List


DebugFormat Method

Common Logging 2.0 API Reference

AbstractLogger.DebugFormat Method

Log a message with the Debug level.

Overload List

Log a message with the Debug level.

public virtual void DebugFormat(IFormatProvider,string,Exception,params object[])

Log a message with the Debug level.

public virtual void DebugFormat(IFormatProvider,string,params object[])

Log a message with the Debug level.

public virtual void DebugFormat(string,Exception,params object[])

Log a message with the Debug level.

public virtual void DebugFormat(string,params object[])

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


AbstractLogger.DebugFormat(IFormatProvider, String, Exception, Object) Method

Log a message with the Debug level.

[Visual Basic]
Public Overridable Overloads Sub DebugFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.DebugFormat
[C#]
public virtual void DebugFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
exception
The exception to log.
args

Implements

ILog.DebugFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.DebugFormat Overload List


AbstractLogger.DebugFormat(IFormatProvider, String, Object) Method

Log a message with the Debug level.

[Visual Basic]
Public Overridable Overloads Sub DebugFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.DebugFormat
[C#]
public virtual void DebugFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
args

Implements

ILog.DebugFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.DebugFormat Overload List


AbstractLogger.DebugFormat(String, Exception, Object) Method

Log a message with the Debug level.

[Visual Basic]
Public Overridable Overloads Sub DebugFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.DebugFormat
[C#]
public virtual void DebugFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of format arguments

Implements

ILog.DebugFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.DebugFormat Overload List


AbstractLogger.DebugFormat(String, Object) Method

Log a message with the Debug level.

[Visual Basic]
Public Overridable Overloads Sub DebugFormat( _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.DebugFormat
[C#]
public virtual void DebugFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args
the list of format arguments

Implements

ILog.DebugFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.DebugFormat Overload List


Error Method

Common Logging 2.0 API Reference

AbstractLogger.Error Method

Log a message with the Error level using a callback to obtain the message

Overload List

Log a message with the Error level using a callback to obtain the message

public virtual void Error(Action<FormatMessageHandler>)

Log a message with the Error level using a callback to obtain the message

public virtual void Error(Action<FormatMessageHandler>,Exception)

Log a message with the Error level using a callback to obtain the message

public virtual void Error(IFormatProvider,Action<FormatMessageHandler>)

Log a message with the Error level using a callback to obtain the message

public virtual void Error(IFormatProvider,Action<FormatMessageHandler>,Exception)

Log a message object with the Error level.

public virtual void Error(object)

Log a message object with the Error level including the stack Error of the Exception passed as a parameter.

public virtual void Error(object,Exception)

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


AbstractLogger.Error(Action) Method

Log a message with the Error level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Error( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Error
[C#]
public virtual void Error(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Error

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Error Overload List


AbstractLogger.Error(Action, Exception) Method

Log a message with the Error level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Error( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Error
[C#]
public virtual void Error(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Error.

Implements

ILog.Error

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Error Overload List


AbstractLogger.Error(IFormatProvider, Action) Method

Log a message with the Error level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Error( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Error
[C#]
public virtual void Error(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Error

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Error Overload List


AbstractLogger.Error(IFormatProvider, Action, Exception) Method

Log a message with the Error level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Error( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Error
[C#]
public virtual void Error(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Error.

Implements

ILog.Error

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Error Overload List


AbstractLogger.Error(Object) Method

Log a message object with the Error level.

[Visual Basic]
Public Overridable Overloads Sub Error( _
ByVal message As Object _
) _
Implements ILog.Error
[C#]
public virtual void Error(
object message
);

Parameters

message
The message object to log.

Implements

ILog.Error

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Error Overload List


AbstractLogger.Error(Object, Exception) Method

Log a message object with the Error level including the stack Error of the Exception passed as a parameter.

[Visual Basic]
Public Overridable Overloads Sub Error( _
ByVal message As Object, _
ByVal exception As Exception _
) _
Implements ILog.Error
[C#]
public virtual void Error(
object message,
Exception exception
);

Parameters

message
The message object to log.
exception
The exception to log, including its stack Error.

Implements

ILog.Error

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Error Overload List


ErrorFormat Method

Common Logging 2.0 API Reference

AbstractLogger.ErrorFormat Method

Log a message with the Error level.

Overload List

Log a message with the Error level.

public virtual void ErrorFormat(IFormatProvider,string,Exception,params object[])

Log a message with the Error level.

public virtual void ErrorFormat(IFormatProvider,string,params object[])

Log a message with the Error level.

public virtual void ErrorFormat(string,Exception,params object[])

Log a message with the Error level.

public virtual void ErrorFormat(string,params object[])

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


AbstractLogger.ErrorFormat(IFormatProvider, String, Exception, Object) Method

Log a message with the Error level.

[Visual Basic]
Public Overridable Overloads Sub ErrorFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.ErrorFormat
[C#]
public virtual void ErrorFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting Errorrmation.
format
The format of the message object to log.Format
exception
The exception to log.
args

Implements

ILog.ErrorFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.ErrorFormat Overload List


AbstractLogger.ErrorFormat(IFormatProvider, String, Object) Method

Log a message with the Error level.

[Visual Basic]
Public Overridable Overloads Sub ErrorFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.ErrorFormat
[C#]
public virtual void ErrorFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting Errorrmation.
format
The format of the message object to log.Format
args

Implements

ILog.ErrorFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.ErrorFormat Overload List


AbstractLogger.ErrorFormat(String, Exception, Object) Method

Log a message with the Error level.

[Visual Basic]
Public Overridable Overloads Sub ErrorFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.ErrorFormat
[C#]
public virtual void ErrorFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of format arguments

Implements

ILog.ErrorFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.ErrorFormat Overload List


AbstractLogger.ErrorFormat(String, Object) Method

Log a message with the Error level.

[Visual Basic]
Public Overridable Overloads Sub ErrorFormat( _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.ErrorFormat
[C#]
public virtual void ErrorFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args
the list of format arguments

Implements

ILog.ErrorFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.ErrorFormat Overload List


Fatal Method

Common Logging 2.0 API Reference

AbstractLogger.Fatal Method

Log a message with the Fatal level using a callback to obtain the message

Overload List

Log a message with the Fatal level using a callback to obtain the message

public virtual void Fatal(Action<FormatMessageHandler>)

Log a message with the Fatal level using a callback to obtain the message

public virtual void Fatal(Action<FormatMessageHandler>,Exception)

Log a message with the Fatal level using a callback to obtain the message

public virtual void Fatal(IFormatProvider,Action<FormatMessageHandler>)

Log a message with the Fatal level using a callback to obtain the message

public virtual void Fatal(IFormatProvider,Action<FormatMessageHandler>,Exception)

Log a message object with the Fatal level.

public virtual void Fatal(object)

Log a message object with the Fatal level including the stack Fatal of the Exception passed as a parameter.

public virtual void Fatal(object,Exception)

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


AbstractLogger.Fatal(Action) Method

Log a message with the Fatal level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Fatal( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Fatal
[C#]
public virtual void Fatal(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Fatal

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Fatal Overload List


AbstractLogger.Fatal(Action, Exception) Method

Log a message with the Fatal level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Fatal( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Fatal
[C#]
public virtual void Fatal(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Fatal.

Implements

ILog.Fatal

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Fatal Overload List


AbstractLogger.Fatal(IFormatProvider, Action) Method

Log a message with the Fatal level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Fatal( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Fatal
[C#]
public virtual void Fatal(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Fatal

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Fatal Overload List


AbstractLogger.Fatal(IFormatProvider, Action, Exception) Method

Log a message with the Fatal level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Fatal( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Fatal
[C#]
public virtual void Fatal(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Fatal.

Implements

ILog.Fatal

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Fatal Overload List


AbstractLogger.Fatal(Object) Method

Log a message object with the Fatal level.

[Visual Basic]
Public Overridable Overloads Sub Fatal( _
ByVal message As Object _
) _
Implements ILog.Fatal
[C#]
public virtual void Fatal(
object message
);

Parameters

message
The message object to log.

Implements

ILog.Fatal

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Fatal Overload List


AbstractLogger.Fatal(Object, Exception) Method

Log a message object with the Fatal level including the stack Fatal of the Exception passed as a parameter.

[Visual Basic]
Public Overridable Overloads Sub Fatal( _
ByVal message As Object, _
ByVal exception As Exception _
) _
Implements ILog.Fatal
[C#]
public virtual void Fatal(
object message,
Exception exception
);

Parameters

message
The message object to log.
exception
The exception to log, including its stack Fatal.

Implements

ILog.Fatal

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Fatal Overload List


FatalFormat Method

Common Logging 2.0 API Reference

AbstractLogger.FatalFormat Method

Log a message with the Fatal level.

Overload List

Log a message with the Fatal level.

public virtual void FatalFormat(IFormatProvider,string,Exception,params object[])

Log a message with the Fatal level.

public virtual void FatalFormat(IFormatProvider,string,params object[])

Log a message with the Fatal level.

public virtual void FatalFormat(string,Exception,params object[])

Log a message with the Fatal level.

public virtual void FatalFormat(string,params object[])

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


AbstractLogger.FatalFormat(IFormatProvider, String, Exception, Object) Method

Log a message with the Fatal level.

[Visual Basic]
Public Overridable Overloads Sub FatalFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.FatalFormat
[C#]
public virtual void FatalFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting Fatalrmation.
format
The format of the message object to log.Format
exception
The exception to log.
args

Implements

ILog.FatalFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.FatalFormat Overload List


AbstractLogger.FatalFormat(IFormatProvider, String, Object) Method

Log a message with the Fatal level.

[Visual Basic]
Public Overridable Overloads Sub FatalFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.FatalFormat
[C#]
public virtual void FatalFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting Fatalrmation.
format
The format of the message object to log.Format
args

Implements

ILog.FatalFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.FatalFormat Overload List


AbstractLogger.FatalFormat(String, Exception, Object) Method

Log a message with the Fatal level.

[Visual Basic]
Public Overridable Overloads Sub FatalFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.FatalFormat
[C#]
public virtual void FatalFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of format arguments

Implements

ILog.FatalFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.FatalFormat Overload List


AbstractLogger.FatalFormat(String, Object) Method

Log a message with the Fatal level.

[Visual Basic]
Public Overridable Overloads Sub FatalFormat( _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.FatalFormat
[C#]
public virtual void FatalFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args
the list of format arguments

Implements

ILog.FatalFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.FatalFormat Overload List


AbstractLogger.GetWriteHandler Method

Override this method to use a different method than WriteInternal for writing log events to the underlying log system.

[Visual Basic]
Protected Overridable Sub GetWriteHandler()
[C#]
protected virtual WriteHandler GetWriteHandler();

Remarks

Usually you don't need to override thise method. The default implementation returns null to indicate that the default handler WriteInternal should be used.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


Info Method

Common Logging 2.0 API Reference

AbstractLogger.Info Method

Log a message with the Info level using a callback to obtain the message

Overload List

Log a message with the Info level using a callback to obtain the message

public virtual void Info(Action<FormatMessageHandler>)

Log a message with the Info level using a callback to obtain the message

public virtual void Info(Action<FormatMessageHandler>,Exception)

Log a message with the Info level using a callback to obtain the message

public virtual void Info(IFormatProvider,Action<FormatMessageHandler>)

Log a message with the Info level using a callback to obtain the message

public virtual void Info(IFormatProvider,Action<FormatMessageHandler>,Exception)

Log a message object with the Info level.

public virtual void Info(object)

Log a message object with the Info level including the stack Info of the Exception passed as a parameter.

public virtual void Info(object,Exception)

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


AbstractLogger.Info(Action) Method

Log a message with the Info level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Info( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Info
[C#]
public virtual void Info(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Info

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Info Overload List


AbstractLogger.Info(Action, Exception) Method

Log a message with the Info level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Info( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Info
[C#]
public virtual void Info(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Info.

Implements

ILog.Info

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Info Overload List


AbstractLogger.Info(IFormatProvider, Action) Method

Log a message with the Info level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Info( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Info
[C#]
public virtual void Info(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Info

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Info Overload List


AbstractLogger.Info(IFormatProvider, Action, Exception) Method

Log a message with the Info level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Info( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Info
[C#]
public virtual void Info(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Info.

Implements

ILog.Info

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Info Overload List


AbstractLogger.Info(Object) Method

Log a message object with the Info level.

[Visual Basic]
Public Overridable Overloads Sub Info( _
ByVal message As Object _
) _
Implements ILog.Info
[C#]
public virtual void Info(
object message
);

Parameters

message
The message object to log.

Implements

ILog.Info

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Info Overload List


AbstractLogger.Info(Object, Exception) Method

Log a message object with the Info level including the stack Info of the Exception passed as a parameter.

[Visual Basic]
Public Overridable Overloads Sub Info( _
ByVal message As Object, _
ByVal exception As Exception _
) _
Implements ILog.Info
[C#]
public virtual void Info(
object message,
Exception exception
);

Parameters

message
The message object to log.
exception
The exception to log, including its stack Info.

Implements

ILog.Info

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Info Overload List


InfoFormat Method

Common Logging 2.0 API Reference

AbstractLogger.InfoFormat Method

Log a message with the Info level.

Overload List

Log a message with the Info level.

public virtual void InfoFormat(IFormatProvider,string,Exception,params object[])

Log a message with the Info level.

public virtual void InfoFormat(IFormatProvider,string,params object[])

Log a message with the Info level.

public virtual void InfoFormat(string,Exception,params object[])

Log a message with the Info level.

public virtual void InfoFormat(string,params object[])

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


AbstractLogger.InfoFormat(IFormatProvider, String, Exception, Object) Method

Log a message with the Info level.

[Visual Basic]
Public Overridable Overloads Sub InfoFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.InfoFormat
[C#]
public virtual void InfoFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
exception
The exception to log.
args

Implements

ILog.InfoFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.InfoFormat Overload List


AbstractLogger.InfoFormat(IFormatProvider, String, Object) Method

Log a message with the Info level.

[Visual Basic]
Public Overridable Overloads Sub InfoFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.InfoFormat
[C#]
public virtual void InfoFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
args

Implements

ILog.InfoFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.InfoFormat Overload List


AbstractLogger.InfoFormat(String, Exception, Object) Method

Log a message with the Info level.

[Visual Basic]
Public Overridable Overloads Sub InfoFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.InfoFormat
[C#]
public virtual void InfoFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of format arguments

Implements

ILog.InfoFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.InfoFormat Overload List


AbstractLogger.InfoFormat(String, Object) Method

Log a message with the Info level.

[Visual Basic]
Public Overridable Overloads Sub InfoFormat( _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.InfoFormat
[C#]
public virtual void InfoFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args
the list of format arguments

Implements

ILog.InfoFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.InfoFormat Overload List


Trace Method

Common Logging 2.0 API Reference

AbstractLogger.Trace Method

Log a message with the Trace level using a callback to obtain the message

Overload List

Log a message with the Trace level using a callback to obtain the message

public virtual void Trace(Action<FormatMessageHandler>)

Log a message with the Trace level using a callback to obtain the message

public virtual void Trace(Action<FormatMessageHandler>,Exception)

Log a message with the Trace level using a callback to obtain the message

public virtual void Trace(IFormatProvider,Action<FormatMessageHandler>)

Log a message with the Trace level using a callback to obtain the message

public virtual void Trace(IFormatProvider,Action<FormatMessageHandler>,Exception)

Log a message object with the Trace level.

public virtual void Trace(object)

Log a message object with the Trace level including the stack trace of the Exception passed as a parameter.

public virtual void Trace(object,Exception)

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


AbstractLogger.Trace(Action) Method

Log a message with the Trace level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Trace( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Trace
[C#]
public virtual void Trace(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Trace

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Trace Overload List


AbstractLogger.Trace(Action, Exception) Method

Log a message with the Trace level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Trace( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Trace
[C#]
public virtual void Trace(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack trace.

Implements

ILog.Trace

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Trace Overload List


AbstractLogger.Trace(IFormatProvider, Action) Method

Log a message with the Trace level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Trace( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Trace
[C#]
public virtual void Trace(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Trace

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Trace Overload List


AbstractLogger.Trace(IFormatProvider, Action, Exception) Method

Log a message with the Trace level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Trace( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Trace
[C#]
public virtual void Trace(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack trace.

Implements

ILog.Trace

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Trace Overload List


AbstractLogger.Trace(Object) Method

Log a message object with the Trace level.

[Visual Basic]
Public Overridable Overloads Sub Trace( _
ByVal message As Object _
) _
Implements ILog.Trace
[C#]
public virtual void Trace(
object message
);

Parameters

message
The message object to log.

Implements

ILog.Trace

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Trace Overload List


AbstractLogger.Trace(Object, Exception) Method

Log a message object with the Trace level including the stack trace of the Exception passed as a parameter.

[Visual Basic]
Public Overridable Overloads Sub Trace( _
ByVal message As Object, _
ByVal exception As Exception _
) _
Implements ILog.Trace
[C#]
public virtual void Trace(
object message,
Exception exception
);

Parameters

message
The message object to log.
exception
The exception to log, including its stack trace.

Implements

ILog.Trace

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Trace Overload List


TraceFormat Method

Common Logging 2.0 API Reference

AbstractLogger.TraceFormat Method

Log a message with the Trace level.

Overload List

Log a message with the Trace level.

public virtual void TraceFormat(IFormatProvider,string,Exception,params object[])

Log a message with the Trace level.

public virtual void TraceFormat(IFormatProvider,string,params object[])

Log a message with the Trace level.

public virtual void TraceFormat(string,Exception,params object[])

Log a message with the Trace level.

public virtual void TraceFormat(string,params object[])

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


AbstractLogger.TraceFormat(IFormatProvider, String, Exception, Object) Method

Log a message with the Trace level.

[Visual Basic]
Public Overridable Overloads Sub TraceFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.TraceFormat
[C#]
public virtual void TraceFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
exception
The exception to log.
args

Implements

ILog.TraceFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.TraceFormat Overload List


AbstractLogger.TraceFormat(IFormatProvider, String, Object) Method

Log a message with the Trace level.

[Visual Basic]
Public Overridable Overloads Sub TraceFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.TraceFormat
[C#]
public virtual void TraceFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
args

Implements

ILog.TraceFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.TraceFormat Overload List


AbstractLogger.TraceFormat(String, Exception, Object) Method

Log a message with the Trace level.

[Visual Basic]
Public Overridable Overloads Sub TraceFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.TraceFormat
[C#]
public virtual void TraceFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of format arguments

Implements

ILog.TraceFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.TraceFormat Overload List


AbstractLogger.TraceFormat(String, Object) Method

Log a message with the Trace level.

[Visual Basic]
Public Overridable Overloads Sub TraceFormat( _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.TraceFormat
[C#]
public virtual void TraceFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args
the list of format arguments

Implements

ILog.TraceFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.TraceFormat Overload List


Warn Method

Common Logging 2.0 API Reference

AbstractLogger.Warn Method

Log a message with the Warn level using a callback to obtain the message

Overload List

Log a message with the Warn level using a callback to obtain the message

public virtual void Warn(Action<FormatMessageHandler>)

Log a message with the Warn level using a callback to obtain the message

public virtual void Warn(Action<FormatMessageHandler>,Exception)

Log a message with the Warn level using a callback to obtain the message

public virtual void Warn(IFormatProvider,Action<FormatMessageHandler>)

Log a message with the Warn level using a callback to obtain the message

public virtual void Warn(IFormatProvider,Action<FormatMessageHandler>,Exception)

Log a message object with the Warn level.

public virtual void Warn(object)

Log a message object with the Warn level including the stack Warn of the Exception passed as a parameter.

public virtual void Warn(object,Exception)

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


AbstractLogger.Warn(Action) Method

Log a message with the Warn level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Warn( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Warn
[C#]
public virtual void Warn(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Warn

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Warn Overload List


AbstractLogger.Warn(Action, Exception) Method

Log a message with the Warn level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Warn( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Warn
[C#]
public virtual void Warn(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Warn.

Implements

ILog.Warn

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Warn Overload List


AbstractLogger.Warn(IFormatProvider, Action) Method

Log a message with the Warn level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Warn( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Warn
[C#]
public virtual void Warn(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Warn

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Warn Overload List


AbstractLogger.Warn(IFormatProvider, Action, Exception) Method

Log a message with the Warn level using a callback to obtain the message

[Visual Basic]
Public Overridable Overloads Sub Warn( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Warn
[C#]
public virtual void Warn(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Warn.

Implements

ILog.Warn

Remarks

Using this method avoids the cost of creating a message and evaluating message arguments that probably won't be logged due to loglevel settings.

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Warn Overload List


AbstractLogger.Warn(Object) Method

Log a message object with the Warn level.

[Visual Basic]
Public Overridable Overloads Sub Warn( _
ByVal message As Object _
) _
Implements ILog.Warn
[C#]
public virtual void Warn(
object message
);

Parameters

message
The message object to log.

Implements

ILog.Warn

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Warn Overload List


AbstractLogger.Warn(Object, Exception) Method

Log a message object with the Warn level including the stack Warn of the Exception passed as a parameter.

[Visual Basic]
Public Overridable Overloads Sub Warn( _
ByVal message As Object, _
ByVal exception As Exception _
) _
Implements ILog.Warn
[C#]
public virtual void Warn(
object message,
Exception exception
);

Parameters

message
The message object to log.
exception
The exception to log, including its stack Warn.

Implements

ILog.Warn

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.Warn Overload List


WarnFormat Method

Common Logging 2.0 API Reference

AbstractLogger.WarnFormat Method

Log a message with the Warn level.

Overload List

Log a message with the Warn level.

public virtual void WarnFormat(IFormatProvider,string,Exception,params object[])

Log a message with the Warn level.

public virtual void WarnFormat(IFormatProvider,string,params object[])

Log a message with the Warn level.

public virtual void WarnFormat(string,Exception,params object[])

Log a message with the Warn level.

public virtual void WarnFormat(string,params object[])

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


AbstractLogger.WarnFormat(IFormatProvider, String, Exception, Object) Method

Log a message with the Warn level.

[Visual Basic]
Public Overridable Overloads Sub WarnFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.WarnFormat
[C#]
public virtual void WarnFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting Warnrmation.
format
The format of the message object to log.Format
exception
The exception to log.
args

Implements

ILog.WarnFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.WarnFormat Overload List


AbstractLogger.WarnFormat(IFormatProvider, String, Object) Method

Log a message with the Warn level.

[Visual Basic]
Public Overridable Overloads Sub WarnFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.WarnFormat
[C#]
public virtual void WarnFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting Warnrmation.
format
The format of the message object to log.Format
args

Implements

ILog.WarnFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.WarnFormat Overload List


AbstractLogger.WarnFormat(String, Exception, Object) Method

Log a message with the Warn level.

[Visual Basic]
Public Overridable Overloads Sub WarnFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.WarnFormat
[C#]
public virtual void WarnFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of format arguments

Implements

ILog.WarnFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.WarnFormat Overload List


AbstractLogger.WarnFormat(String, Object) Method

Log a message with the Warn level.

[Visual Basic]
Public Overridable Overloads Sub WarnFormat( _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.WarnFormat
[C#]
public virtual void WarnFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args
the list of format arguments

Implements

ILog.WarnFormat

See Also

AbstractLogger Class | Common.Logging.Factory Namespace | AbstractLogger.WarnFormat Overload List


AbstractLogger.WriteInternal Method

Actually sends the message to the underlying log system.

[Visual Basic]
Protected MustOverride Sub WriteInternal( _
ByVal level As LogLevel, _
ByVal message As Object, _
ByVal exception As Exception _
)
[C#]
protected abstract void WriteInternal(
LogLevel level,
object message,
Exception exception
);

Parameters

level
the level of this log event.
message
the message to log
exception
the exception to log (may be null)

See Also

AbstractLogger Class | Common.Logging.Factory Namespace


AbstractLogger.WriteHandler Delegate

Represents a method responsible for writing a message to the log system.

[Visual Basic]
Protected Delegate Function WriteHandler( _
ByVal level As LogLevel, _
ByVal message As Object, _
ByVal exception As Exception _
)
[C#]
protected delegate void WriteHandler(
LogLevel level,
object message,
Exception exception
);

Requirements

Namespace: Common.Logging.Factory

Assembly: Common.Logging (in Common.Logging.dll)

See Also

Common.Logging.Factory Namespace

Send comments on this topic.


Common.Logging.Simple

Common Logging 2.0 API Reference

Common.Logging.Simple Namespace

This namespace contains out-of-the-box adapters to intrinsic systems, namely ConsoleOutLoggerFactoryAdapter and TraceLoggerFactoryAdapter.

Namespace Hierarchy

Classes

Class | Description
AbstractSimpleLogger | Abstract class providing a standard implementation of simple loggers.
AbstractSimpleLoggerFactoryAdapter | Base factory implementation for creating simple ILog instances.
CapturingLogger | A logger created by CapturingLoggerFactoryAdapter that sends all log events to the owning adapter's AddEvent
CapturingLoggerEvent | A logging event captured by CapturingLogger
CapturingLoggerFactoryAdapter | An adapter, who's loggers capture all log events and send them to AddEvent. Retrieve the list of log events from LoggerEvents.
CommonLoggingTraceListener | A TraceListener implementation sending all System.Diagnostics.Trace output to the Common.Logging infrastructure.
ConsoleOutLogger | Sends log messages to Out.
ConsoleOutLoggerFactoryAdapter | Factory for creating ILog instances that write data to Out.
NoOpLogger | Silently ignores all log messages.
NoOpLoggerFactoryAdapter | Factory for creating ILog instances that silently ignores logging requests.
TraceLogger | Logger sending everything to the trace output stream using Trace.
TraceLoggerFactoryAdapter | Factory for creating ILog instances that send everything to the Trace output stream.


AbstractSimpleLogger Class

Abstract class providing a standard implementation of simple loggers.

For a list of all members of this type, see AbstractSimpleLogger Members .

System.Object
AbstractLogger
AbstractSimpleLogger
CapturingLogger
ConsoleOutLogger
TraceLogger

[Visual Basic]
<Serializable> _
Public MustInherit Class AbstractSimpleLogger
Inherits AbstractLogger
[C#]
[Serializable]
public abstract class AbstractSimpleLogger : AbstractLogger

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.Simple

Assembly: Common.Logging (in Common.Logging.dll)

See Also

AbstractSimpleLogger Members | Common.Logging.Simple Namespace


AbstractSimpleLogger Members

AbstractSimpleLogger overview

Public Instance Constructors

AbstractSimpleLogger Constructor Creates and initializes a the simple logger.

Public Instance Properties

CurrentLogLevel | The current logging threshold. Messages recieved that are beneath this threshold will not be logged.
DateTimeFormat | The date and time format to use in the log message.
HasDateTimeFormat | Determines Whether DateTimeFormat is set.
IsDebugEnabled | Returns true if the current LogLevel is greater than or equal to Debug. If it is, all messages will be sent to Out.
IsErrorEnabled | Returns true if the current LogLevel is greater than or equal to Error. If it is, only messages with a LogLevel of Error and Fatal will be sent to Out.
IsFatalEnabled | Returns true if the current LogLevel is greater than or equal to Fatal. If it is, only messages with a LogLevel of Fatal will be sent to Out.
IsInfoEnabled | Returns true if the current LogLevel is greater than or equal to Info. If it is, only messages with a LogLevel of Info, Warn, Error, and Fatal will be sent to Out.
IsTraceEnabled | Returns true if the current LogLevel is greater than or equal to Trace. If it is, all messages will be sent to Out.
IsWarnEnabled | Returns true if the current LogLevel is greater than or equal to Warn. If it is, only messages with a LogLevel of Warn, Error, and Fatal will be sent to Out.
Name | The name of the logger.
ShowDateTime | Include the current time in the log message.
ShowLevel | Include the current log level in the log message.
ShowLogName | Include the instance name in the log message.

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Methods

Finalize (inherited from Object) |
FormatOutput | Appends the formatted message to the specified StringBuilder.
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
IsLevelEnabled | Determines if the given log level is currently enabled.
MemberwiseClone (inherited from Object) |
WriteInternal (inherited from AbstractLogger) | Actually sends the message to the underlying log system.

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


AbstractSimpleLogger Constructor

Creates and initializes a the simple logger.

[Visual Basic]
Public Sub New( _
ByVal logName As String, _
ByVal logLevel As LogLevel, _
ByVal showlevel As Boolean, _
ByVal showDateTime As Boolean, _
ByVal showLogName As Boolean, _
ByVal dateTimeFormat As String _
)
[C#]
AbstractSimpleLogger(
string logName,
LogLevel logLevel,
bool showlevel,
bool showDateTime,
bool showLogName,
string dateTimeFormat
);

Parameters

logName
The name, usually type name of the calling class, of the logger.
logLevel
The current logging threshold. Messages recieved that are beneath this threshold will not be logged.
showlevel
Include level in the log message.
showDateTime
Include the current time in the log message.
showLogName
Include the instance name in the log message.
dateTimeFormat
The date and time format to use in the log message.

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


AbstractSimpleLogger Properties

The properties of the AbstractSimpleLogger class are listed below. For a complete list of AbstractSimpleLogger class members, see the AbstractSimpleLogger Members topic.

Public Instance Properties

CurrentLogLevel | The current logging threshold. Messages recieved that are beneath this threshold will not be logged.
DateTimeFormat | The date and time format to use in the log message.
HasDateTimeFormat | Determines Whether DateTimeFormat is set.
IsDebugEnabled | Returns true if the current LogLevel is greater than or equal to Debug. If it is, all messages will be sent to Out.
IsErrorEnabled | Returns true if the current LogLevel is greater than or equal to Error. If it is, only messages with a LogLevel of Error and Fatal will be sent to Out.
IsFatalEnabled | Returns true if the current LogLevel is greater than or equal to Fatal. If it is, only messages with a LogLevel of Fatal will be sent to Out.
IsInfoEnabled | Returns true if the current LogLevel is greater than or equal to Info. If it is, only messages with a LogLevel of Info, Warn, Error, and Fatal will be sent to Out.
IsTraceEnabled | Returns true if the current LogLevel is greater than or equal to Trace. If it is, all messages will be sent to Out.
IsWarnEnabled | Returns true if the current LogLevel is greater than or equal to Warn. If it is, only messages with a LogLevel of Warn, Error, and Fatal will be sent to Out.
Name | The name of the logger.
ShowDateTime | Include the current time in the log message.
ShowLevel | Include the current log level in the log message.
ShowLogName | Include the instance name in the log message.

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


CurrentLogLevel Property

Common Logging 2.0 API Reference

AbstractSimpleLogger.CurrentLogLevel Property

The current logging threshold. Messages recieved that are beneath this threshold will not be logged.

[Visual Basic]
Public Property CurrentLogLevel() As LogLevel
Public Get
End Get
Public Set
End Set
End Property
[C#]
public LogLevel CurrentLogLevel { public get; public set; }

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


DateTimeFormat Property

Common Logging 2.0 API Reference

AbstractSimpleLogger.DateTimeFormat Property

The date and time format to use in the log message.

[Visual Basic]
Public ReadOnly Property DateTimeFormat() As String
Public Get
End Get
End Property
[C#]
public string DateTimeFormat { public get; }

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


HasDateTimeFormat Property

Common Logging 2.0 API Reference

AbstractSimpleLogger.HasDateTimeFormat Property

Determines Whether DateTimeFormat is set.

[Visual Basic]
Public ReadOnly Property HasDateTimeFormat() As Boolean
Public Get
End Get
End Property
[C#]
public bool HasDateTimeFormat { public get; }

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


IsDebugEnabled Property

Common Logging 2.0 API Reference

AbstractSimpleLogger.IsDebugEnabled Property

Returns true if the current LogLevel is greater than or equal to Debug. If it is, all messages will be sent to Out.

[Visual Basic]
Public Overrides ReadOnly Property IsDebugEnabled() As Boolean _
Implements ILog.IsDebugEnabled

Public Get
End Get
End Property
[C#]
public override bool IsDebugEnabled { public get; }

Implements

ILog.IsDebugEnabled

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


IsErrorEnabled Property

Common Logging 2.0 API Reference

AbstractSimpleLogger.IsErrorEnabled Property

Returns true if the current LogLevel is greater than or equal to Error. If it is, only messages with a LogLevel of Error and Fatal will be sent to Out.

[Visual Basic]
Public Overrides ReadOnly Property IsErrorEnabled() As Boolean _
Implements ILog.IsErrorEnabled

Public Get
End Get
End Property
[C#]
public override bool IsErrorEnabled { public get; }

Implements

ILog.IsErrorEnabled

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


IsFatalEnabled Property

Common Logging 2.0 API Reference

AbstractSimpleLogger.IsFatalEnabled Property

Returns true if the current LogLevel is greater than or equal to Fatal. If it is, only messages with a LogLevel of Fatal will be sent to Out.

[Visual Basic]
Public Overrides ReadOnly Property IsFatalEnabled() As Boolean _
Implements ILog.IsFatalEnabled

Public Get
End Get
End Property
[C#]
public override bool IsFatalEnabled { public get; }

Implements

ILog.IsFatalEnabled

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


IsInfoEnabled Property

Common Logging 2.0 API Reference

AbstractSimpleLogger.IsInfoEnabled Property

Returns true if the current LogLevel is greater than or equal to Info. If it is, only messages with a LogLevel of Info, Warn, Error, and Fatal will be sent to Out.

[Visual Basic]
Public Overrides ReadOnly Property IsInfoEnabled() As Boolean _
Implements ILog.IsInfoEnabled

Public Get
End Get
End Property
[C#]
public override bool IsInfoEnabled { public get; }

Implements

ILog.IsInfoEnabled

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


IsTraceEnabled Property

Common Logging 2.0 API Reference

AbstractSimpleLogger.IsTraceEnabled Property

Returns true if the current LogLevel is greater than or equal to Trace. If it is, all messages will be sent to Out.

[Visual Basic]
Public Overrides ReadOnly Property IsTraceEnabled() As Boolean _
Implements ILog.IsTraceEnabled

Public Get
End Get
End Property
[C#]
public override bool IsTraceEnabled { public get; }

Implements

ILog.IsTraceEnabled

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


IsWarnEnabled Property

Common Logging 2.0 API Reference

AbstractSimpleLogger.IsWarnEnabled Property

Returns true if the current LogLevel is greater than or equal to Warn. If it is, only messages with a LogLevel of Warn, Error, and Fatal will be sent to Out.

[Visual Basic]
Public Overrides ReadOnly Property IsWarnEnabled() As Boolean _
Implements ILog.IsWarnEnabled

Public Get
End Get
End Property
[C#]
public override bool IsWarnEnabled { public get; }

Implements

ILog.IsWarnEnabled

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


Name Property

Common Logging 2.0 API Reference

AbstractSimpleLogger.Name Property

The name of the logger.

[Visual Basic]
Public ReadOnly Property Name() As String
Public Get
End Get
End Property
[C#]
public string Name { public get; }

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


ShowDateTime Property

Common Logging 2.0 API Reference

AbstractSimpleLogger.ShowDateTime Property

Include the current time in the log message.

[Visual Basic]
Public ReadOnly Property ShowDateTime() As Boolean
Public Get
End Get
End Property
[C#]
public bool ShowDateTime { public get; }

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


ShowLevel Property

Common Logging 2.0 API Reference

AbstractSimpleLogger.ShowLevel Property

Include the current log level in the log message.

[Visual Basic]
Public ReadOnly Property ShowLevel() As Boolean
Public Get
End Get
End Property
[C#]
public bool ShowLevel { public get; }

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


ShowLogName Property

Common Logging 2.0 API Reference

AbstractSimpleLogger.ShowLogName Property

Include the instance name in the log message.

[Visual Basic]
Public ReadOnly Property ShowLogName() As Boolean
Public Get
End Get
End Property
[C#]
public bool ShowLogName { public get; }

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


AbstractSimpleLogger Methods

The methods of the AbstractSimpleLogger class are listed below. For a complete list of AbstractSimpleLogger class members, see the AbstractSimpleLogger Members topic.

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Methods

Finalize (inherited from Object) |
FormatOutput | Appends the formatted message to the specified StringBuilder.
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
IsLevelEnabled | Determines if the given log level is currently enabled.
MemberwiseClone (inherited from Object) |
WriteInternal (inherited from AbstractLogger) | Actually sends the message to the underlying log system.

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


AbstractSimpleLogger.FormatOutput Method

Appends the formatted message to the specified StringBuilder.

[Visual Basic]
Protected Overridable Sub FormatOutput( _
ByVal stringBuilder As StringBuilder, _
ByVal level As LogLevel, _
ByVal message As Object, _
ByVal e As Exception _
)
[C#]
protected virtual void FormatOutput(
StringBuilder stringBuilder,
LogLevel level,
object message,
Exception e
);

Parameters

stringBuilder
the StringBuilder that receíves the formatted message.
level
message
e

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


AbstractSimpleLogger.IsLevelEnabled Method

Determines if the given log level is currently enabled.

[Visual Basic]
Protected Overridable Sub IsLevelEnabled( _
ByVal level As LogLevel _
)
[C#]
protected virtual bool IsLevelEnabled(
LogLevel level
);

Parameters

level

Return Value

See Also

AbstractSimpleLogger Class | Common.Logging.Simple Namespace


AbstractSimpleLoggerFactoryAdapter Class

Base factory implementation for creating simple ILog instances.

For a list of all members of this type, see AbstractSimpleLoggerFactoryAdapter Members .

System.Object
AbstractCachingLoggerFactoryAdapter
AbstractSimpleLoggerFactoryAdapter
ConsoleOutLoggerFactoryAdapter
TraceLoggerFactoryAdapter

[Visual Basic]
Public MustInherit Class AbstractSimpleLoggerFactoryAdapter
Inherits AbstractCachingLoggerFactoryAdapter
[C#]
public abstract class AbstractSimpleLoggerFactoryAdapter : AbstractCachingLoggerFactoryAdapter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Default settings are LogLevel.All, showDateTime = true, showLogName = true, and no DateTimeFormat. The keys in the NameValueCollection to configure this adapter are the following

  • level
  • showDateTime
  • showLogName
  • dateTimeFormat

Requirements

Namespace: Common.Logging.Simple

Assembly: Common.Logging (in Common.Logging.dll)

See Also

AbstractSimpleLoggerFactoryAdapter Members | Common.Logging.Simple Namespace | Adapter | ConfigurationSectionHandler


AbstractSimpleLoggerFactoryAdapter Members

AbstractSimpleLoggerFactoryAdapter overview

Public Instance Properties

DateTimeFormat | The default setting to use when creating new ILog instances.
Level | The default LogLevel to use when creating new ILog instances.
ShowDateTime | The default setting to use when creating new ILog instances.
ShowLevel | The default setting to use when creating new ILog instances.
ShowLogName | The default setting to use when creating new ILog instances.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Constructors

AbstractSimpleLoggerFactoryAdapter Constructor Initializes a new instance of the AbstractSimpleLoggerFactoryAdapter class.

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Overloaded. Create the specified logger instance
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

AbstractSimpleLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | Adapter | ConfigurationSectionHandler


AbstractSimpleLoggerFactoryAdapter Constructor

Initializes a new instance of the AbstractSimpleLoggerFactoryAdapter class.

[Visual Basic]
Protected Sub New( _
ByVal properties As NameValueCollection _
)
[C#]
AbstractSimpleLoggerFactoryAdapter(
NameValueCollection properties
);

Parameters

properties
The name value collection, typically specified by the user in a configuration section named common/logging.

Remarks

Looks for level, showDateTime, showLogName, dateTimeFormat items from properties for use when the GetLogger methods are called. ConfigurationSectionHandler for more information on how to use the standard .NET application configuraiton file (App.config/Web.config) to configure this adapter.

See Also

AbstractSimpleLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


AbstractSimpleLoggerFactoryAdapter Properties

The properties of the AbstractSimpleLoggerFactoryAdapter class are listed below. For a complete list of AbstractSimpleLoggerFactoryAdapter class members, see the AbstractSimpleLoggerFactoryAdapter Members topic.

Public Instance Properties

DateTimeFormat | The default setting to use when creating new ILog instances.
Level | The default LogLevel to use when creating new ILog instances.
ShowDateTime | The default setting to use when creating new ILog instances.
ShowLevel | The default setting to use when creating new ILog instances.
ShowLogName | The default setting to use when creating new ILog instances.

See Also

AbstractSimpleLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | Adapter | ConfigurationSectionHandler


DateTimeFormat Property

Common Logging 2.0 API Reference

AbstractSimpleLoggerFactoryAdapter.DateTimeFormat Property

The default setting to use when creating new ILog instances.

[Visual Basic]
Public Property DateTimeFormat() As String
Public Get
End Get
Public Set
End Set
End Property
[C#]
public string DateTimeFormat { public get; public set; }

See Also

AbstractSimpleLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


Level Property

Common Logging 2.0 API Reference

AbstractSimpleLoggerFactoryAdapter.Level Property

The default LogLevel to use when creating new ILog instances.

[Visual Basic]
Public Property Level() As LogLevel
Public Get
End Get
Public Set
End Set
End Property
[C#]
public LogLevel Level { public get; public set; }

See Also

AbstractSimpleLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


ShowDateTime Property

Common Logging 2.0 API Reference

AbstractSimpleLoggerFactoryAdapter.ShowDateTime Property

The default setting to use when creating new ILog instances.

[Visual Basic]
Public Property ShowDateTime() As Boolean
Public Get
End Get
Public Set
End Set
End Property
[C#]
public bool ShowDateTime { public get; public set; }

See Also

AbstractSimpleLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


ShowLevel Property

Common Logging 2.0 API Reference

AbstractSimpleLoggerFactoryAdapter.ShowLevel Property

The default setting to use when creating new ILog instances.

[Visual Basic]
Public Property ShowLevel() As Boolean
Public Get
End Get
Public Set
End Set
End Property
[C#]
public bool ShowLevel { public get; public set; }

See Also

AbstractSimpleLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


ShowLogName Property

Common Logging 2.0 API Reference

AbstractSimpleLoggerFactoryAdapter.ShowLogName Property

The default setting to use when creating new ILog instances.

[Visual Basic]
Public Property ShowLogName() As Boolean
Public Get
End Get
Public Set
End Set
End Property
[C#]
public bool ShowLogName { public get; public set; }

See Also

AbstractSimpleLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


AbstractSimpleLoggerFactoryAdapter Methods

The methods of the AbstractSimpleLoggerFactoryAdapter class are listed below. For a complete list of AbstractSimpleLoggerFactoryAdapter class members, see the AbstractSimpleLoggerFactoryAdapter Members topic.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Overloaded. Create the specified logger instance
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

AbstractSimpleLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | Adapter | ConfigurationSectionHandler


CreateLogger Method

Common Logging 2.0 API Reference

AbstractSimpleLoggerFactoryAdapter.CreateLogger Method

Create the specified logger instance

Overload List

Create the specified logger instance

protected override ILog CreateLogger(string)

Derived factories need to implement this method to create the actual logger instance.

protected abstract ILog CreateLogger(string,LogLevel,bool,bool,bool,string)

See Also

AbstractSimpleLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


AbstractSimpleLoggerFactoryAdapter.CreateLogger(String) Method

Create the specified logger instance

[Visual Basic]
Protected Overrides Overloads Sub CreateLogger( _
ByVal name As String _
)
[C#]
protected override ILog CreateLogger(
string name
);

See Also

AbstractSimpleLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | AbstractSimpleLoggerFactoryAdapter.CreateLogger Overload List


AbstractSimpleLoggerFactoryAdapter.CreateLogger(String, LogLevel, Boolean, Boolean, Boolean, String) Method

Derived factories need to implement this method to create the actual logger instance.

[Visual Basic]
Protected MustOverride Overloads Sub CreateLogger( _
ByVal name As String, _
ByVal level As LogLevel, _
ByVal showLevel As Boolean, _
ByVal showDateTime As Boolean, _
ByVal showLogName As Boolean, _
ByVal dateTimeFormat As String _
)
[C#]
protected abstract ILog CreateLogger(
string name,
LogLevel level,
bool showLevel,
bool showDateTime,
bool showLogName,
string dateTimeFormat
);

Return Value

a new logger instance. Must never be null!

See Also

AbstractSimpleLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | AbstractSimpleLoggerFactoryAdapter.CreateLogger Overload List


CapturingLogger Class

A logger created by CapturingLoggerFactoryAdapter that sends all log events to the owning adapter's AddEvent

For a list of all members of this type, see CapturingLogger Members .

System.Object
AbstractLogger
AbstractSimpleLogger
CapturingLogger

[Visual Basic]
Public Class CapturingLogger
Inherits AbstractSimpleLogger
[C#]
public class CapturingLogger : AbstractSimpleLogger

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.Simple

Assembly: Common.Logging (in Common.Logging.dll)

See Also

CapturingLogger Members | Common.Logging.Simple Namespace


CapturingLogger Members

CapturingLogger overview

Public Instance Constructors

CapturingLogger Constructor Create a new logger instance.

Public Instance Fields

LastEvent | Allows to retrieve the last logged event instance captured by this logger
Owner | The adapter that created this logger instance.

Public Instance Properties

CurrentLogLevel (inherited from AbstractSimpleLogger) | The current logging threshold. Messages recieved that are beneath this threshold will not be logged.
DateTimeFormat (inherited from AbstractSimpleLogger) | The date and time format to use in the log message.
HasDateTimeFormat (inherited from AbstractSimpleLogger) | Determines Whether DateTimeFormat is set.
IsDebugEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Debug. If it is, all messages will be sent to Out.
IsErrorEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Error. If it is, only messages with a LogLevel of Error and Fatal will be sent to Out.
IsFatalEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Fatal. If it is, only messages with a LogLevel of Fatal will be sent to Out.
IsInfoEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Info. If it is, only messages with a LogLevel of Info, Warn, Error, and Fatal will be sent to Out.
IsTraceEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Trace. If it is, all messages will be sent to Out.
IsWarnEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Warn. If it is, only messages with a LogLevel of Warn, Error, and Fatal will be sent to Out.
Name (inherited from AbstractSimpleLogger) | The name of the logger.
ShowDateTime (inherited from AbstractSimpleLogger) | Include the current time in the log message.
ShowLevel (inherited from AbstractSimpleLogger) | Include the current log level in the log message.
ShowLogName (inherited from AbstractSimpleLogger) | Include the instance name in the log message.

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Methods

Finalize (inherited from Object) |
FormatOutput (inherited from AbstractSimpleLogger) | Appends the formatted message to the specified StringBuilder.
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
IsLevelEnabled (inherited from AbstractSimpleLogger) | Determines if the given log level is currently enabled.
MemberwiseClone (inherited from Object) |
WriteInternal | Create a new CapturingLoggerEvent and send it to AddEvent

See Also

CapturingLogger Class | Common.Logging.Simple Namespace


CapturingLogger Constructor

Create a new logger instance.

[Visual Basic]
Public Sub New( _
ByVal owner As CapturingLoggerFactoryAdapter, _
ByVal logName As String _
)
[C#]
CapturingLogger(
CapturingLoggerFactoryAdapter owner,
string logName
);

See Also

CapturingLogger Class | Common.Logging.Simple Namespace


CapturingLogger Fields

The fields of the CapturingLogger class are listed below. For a complete list of CapturingLogger class members, see the CapturingLogger Members topic.

Public Instance Fields

LastEvent | Allows to retrieve the last logged event instance captured by this logger
Owner | The adapter that created this logger instance.

See Also

CapturingLogger Class | Common.Logging.Simple Namespace


CapturingLogger.LastEvent Field

Allows to retrieve the last logged event instance captured by this logger

[Visual Basic]
Public LastEvent As CapturingLoggerEvent
[C#]
public CapturingLoggerEvent LastEvent;

See Also

CapturingLogger Class | Common.Logging.Simple Namespace


CapturingLogger.Owner Field

The adapter that created this logger instance.

[Visual Basic]
Public ReadOnly Owner As CapturingLoggerFactoryAdapter
[C#]
public readonly CapturingLoggerFactoryAdapter Owner;

See Also

CapturingLogger Class | Common.Logging.Simple Namespace


CapturingLogger Methods

The methods of the CapturingLogger class are listed below. For a complete list of CapturingLogger class members, see the CapturingLogger Members topic.

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Methods

Finalize (inherited from Object) |
FormatOutput (inherited from AbstractSimpleLogger) | Appends the formatted message to the specified StringBuilder.
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
IsLevelEnabled (inherited from AbstractSimpleLogger) | Determines if the given log level is currently enabled.
MemberwiseClone (inherited from Object) |
WriteInternal | Create a new CapturingLoggerEvent and send it to AddEvent

See Also

CapturingLogger Class | Common.Logging.Simple Namespace


CapturingLogger.WriteInternal Method

Create a new CapturingLoggerEvent and send it to AddEvent

[Visual Basic]
Protected Overrides Sub WriteInternal( _
ByVal level As LogLevel, _
ByVal message As Object, _
ByVal exception As Exception _
)
[C#]
protected override void WriteInternal(
LogLevel level,
object message,
Exception exception
);

Parameters

level
message
exception

See Also

CapturingLogger Class | Common.Logging.Simple Namespace


CapturingLoggerEvent Class

A logging event captured by CapturingLogger

For a list of all members of this type, see CapturingLoggerEvent Members .

System.Object
CapturingLoggerEvent

[Visual Basic]
Public Class CapturingLoggerEvent
[C#]
public class CapturingLoggerEvent

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.Simple

Assembly: Common.Logging (in Common.Logging.dll)

See Also

CapturingLoggerEvent Members | Common.Logging.Simple Namespace


CapturingLoggerEvent Members

CapturingLoggerEvent overview

Public Instance Constructors

CapturingLoggerEvent Constructor Create a new event instance

Public Instance Fields

Exception | A logged exception
Level | The level used to log this event
MessageObject | The raw message object
Source | The logger that logged this event

Public Instance Properties

RenderedMessage Retrieves the formatted message text

Public Instance Methods

Equals (inherited from Object)
GetHashCode (inherited from Object)
GetType (inherited from Object)
ToString (inherited from Object)

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

CapturingLoggerEvent Class | Common.Logging.Simple Namespace


CapturingLoggerEvent Constructor

Create a new event instance

[Visual Basic]
Public Sub New( _
ByVal source As CapturingLogger, _
ByVal level As LogLevel, _
ByVal messageObject As Object, _
ByVal exception As Exception _
)
[C#]
CapturingLoggerEvent(
CapturingLogger source,
LogLevel level,
object messageObject,
Exception exception
);

See Also

CapturingLoggerEvent Class | Common.Logging.Simple Namespace


CapturingLoggerEvent Fields

The fields of the CapturingLoggerEvent class are listed below. For a complete list of CapturingLoggerEvent class members, see the CapturingLoggerEvent Members topic.

Public Instance Fields

Exception | A logged exception
Level | The level used to log this event
MessageObject | The raw message object
Source | The logger that logged this event

See Also

CapturingLoggerEvent Class | Common.Logging.Simple Namespace


CapturingLoggerEvent.Exception Field

A logged exception

[Visual Basic]
Public ReadOnly Exception As Exception
[C#]
public readonly Exception Exception;

See Also

CapturingLoggerEvent Class | Common.Logging.Simple Namespace


CapturingLoggerEvent.Level Field

The level used to log this event

[Visual Basic]
Public ReadOnly Level As LogLevel
[C#]
public readonly LogLevel Level;

See Also

CapturingLoggerEvent Class | Common.Logging.Simple Namespace


CapturingLoggerEvent.MessageObject Field

The raw message object

[Visual Basic]
Public ReadOnly MessageObject As Object
[C#]
public readonly object MessageObject;

See Also

CapturingLoggerEvent Class | Common.Logging.Simple Namespace


CapturingLoggerEvent.Source Field

The logger that logged this event

[Visual Basic]
Public ReadOnly Source As CapturingLogger
[C#]
public readonly CapturingLogger Source;

See Also

CapturingLoggerEvent Class | Common.Logging.Simple Namespace


CapturingLoggerEvent Properties

The properties of the CapturingLoggerEvent class are listed below. For a complete list of CapturingLoggerEvent class members, see the CapturingLoggerEvent Members topic.

Public Instance Properties

RenderedMessage Retrieves the formatted message text

See Also

CapturingLoggerEvent Class | Common.Logging.Simple Namespace


RenderedMessage Property

Common Logging 2.0 API Reference

CapturingLoggerEvent.RenderedMessage Property

Retrieves the formatted message text

[Visual Basic]
Public ReadOnly Property RenderedMessage() As String
Public Get
End Get
End Property
[C#]
public string RenderedMessage { public get; }

See Also

CapturingLoggerEvent Class | Common.Logging.Simple Namespace


CapturingLoggerFactoryAdapter Class

An adapter, who's loggers capture all log events and send them to AddEvent. Retrieve the list of log events from LoggerEvents.

For a list of all members of this type, see CapturingLoggerFactoryAdapter Members .

System.Object
CapturingLoggerFactoryAdapter

[Visual Basic]
Public Class CapturingLoggerFactoryAdapter
Implements ILoggerFactoryAdapter
[C#]
public class CapturingLoggerFactoryAdapter : ILoggerFactoryAdapter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

This logger factory is mainly for debugging and test purposes. This is an example how you might use this adapter for testing:

// configure for capturing
CapturingLoggerFactoryAdapter adapter = new CapturingLoggerFactoryAdapter();
LogManager.Adapter = adapter;

// reset capture state
adapter.Clear();
// log something
ILog log = LogManager.GetCurrentClassLogger();
log.DebugFormat("Current Time:{0}", DateTime.Now);

// check logged data
Assert.AreEqual(1, adapter.LoggerEvents.Count);
Assert.AreEqual(LogLevel.Debug, adapter.LastEvent.Level);

Requirements

Namespace: Common.Logging.Simple

Assembly: Common.Logging (in Common.Logging.dll)

See Also

CapturingLoggerFactoryAdapter Members | Common.Logging.Simple Namespace


CapturingLoggerFactoryAdapter Members

CapturingLoggerFactoryAdapter overview

Public Instance Constructors

CapturingLoggerFactoryAdapter Constructor Initializes a new instance of the CapturingLoggerFactoryAdapter class.

Public Instance Fields

LoggerEvents Holds the list of logged events.

Public Instance Properties

LastEvent Holds the last log event received from any of this adapter's loggers.

Public Instance Methods

AddEvent | CapturingLogger instances send their captured log events to this method.
Clear | Clears all captured events
ClearLastEvent | Resets the LastEvent to null.
Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger | Overloaded. Get a CapturingLogger instance for the given type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

CapturingLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


CapturingLoggerFactoryAdapter Constructor

Initializes a new instance of the CapturingLoggerFactoryAdapter class.

[Visual Basic]
Public Sub New()
[C#]
CapturingLoggerFactoryAdapter();

See Also

CapturingLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


CapturingLoggerFactoryAdapter Fields

The fields of the CapturingLoggerFactoryAdapter class are listed below. For a complete list of CapturingLoggerFactoryAdapter class members, see the CapturingLoggerFactoryAdapter Members topic.

Public Instance Fields

LoggerEvents Holds the list of logged events.

See Also

CapturingLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


CapturingLoggerFactoryAdapter.LoggerEvents Field

Holds the list of logged events.

[Visual Basic]
Public ReadOnly LoggerEvents As IList(Of CapturingLoggerEvent)
[C#]
public readonly IList<CapturingLoggerEvent> LoggerEvents;

Remarks

To access this collection in a multithreaded application, put a lock on the list instance.

See Also

CapturingLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


CapturingLoggerFactoryAdapter Properties

The properties of the CapturingLoggerFactoryAdapter class are listed below. For a complete list of CapturingLoggerFactoryAdapter class members, see the CapturingLoggerFactoryAdapter Members topic.

Public Instance Properties

LastEvent Holds the last log event received from any of this adapter's loggers.

See Also

CapturingLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


LastEvent Property

Common Logging 2.0 API Reference

CapturingLoggerFactoryAdapter.LastEvent Property

Holds the last log event received from any of this adapter's loggers.

[Visual Basic]
Public ReadOnly Property LastEvent() As CapturingLoggerEvent
Public Get
End Get
End Property
[C#]
public CapturingLoggerEvent LastEvent { public get; }

See Also

CapturingLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


CapturingLoggerFactoryAdapter Methods

The methods of the CapturingLoggerFactoryAdapter class are listed below. For a complete list of CapturingLoggerFactoryAdapter class members, see the CapturingLoggerFactoryAdapter Members topic.

Public Instance Methods

AddEvent | CapturingLogger instances send their captured log events to this method.
Clear | Clears all captured events
ClearLastEvent | Resets the LastEvent to null.
Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger | Overloaded. Get a CapturingLogger instance for the given type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

CapturingLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


CapturingLoggerFactoryAdapter.AddEvent Method

CapturingLogger instances send their captured log events to this method.

[Visual Basic]
Public Overridable Sub AddEvent( _
ByVal loggerEvent As CapturingLoggerEvent _
)
[C#]
public virtual void AddEvent(
CapturingLoggerEvent loggerEvent
);

See Also

CapturingLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


CapturingLoggerFactoryAdapter.Clear Method

Clears all captured events

[Visual Basic]
Public Sub Clear()
[C#]
public void Clear();

See Also

CapturingLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


CapturingLoggerFactoryAdapter.ClearLastEvent Method

Resets the LastEvent to null.

[Visual Basic]
Public Sub ClearLastEvent()
[C#]
public void ClearLastEvent();

See Also

CapturingLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


GetLogger Method

Common Logging 2.0 API Reference

CapturingLoggerFactoryAdapter.GetLogger Method

Get a CapturingLogger instance for the given name.

Overload List

Get a CapturingLogger instance for the given name.

public ILog GetLogger(string)

Get a CapturingLogger instance for the given type.

public ILog GetLogger(Type)

See Also

CapturingLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


CapturingLoggerFactoryAdapter.GetLogger(String) Method

Get a CapturingLogger instance for the given name.

[Visual Basic]
Public NotOverridable Overloads Sub GetLogger( _
ByVal name As String _
) _
Implements ILoggerFactoryAdapter.GetLogger
[C#]
public ILog GetLogger(
string name
);

Implements

ILoggerFactoryAdapter.GetLogger

See Also

CapturingLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | CapturingLoggerFactoryAdapter.GetLogger Overload List


CapturingLoggerFactoryAdapter.GetLogger(Type) Method

Get a CapturingLogger instance for the given type.

[Visual Basic]
Public NotOverridable Overloads Sub GetLogger( _
ByVal type As Type _
) _
Implements ILoggerFactoryAdapter.GetLogger
[C#]
public ILog GetLogger(
Type type
);

Implements

ILoggerFactoryAdapter.GetLogger

See Also

CapturingLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | CapturingLoggerFactoryAdapter.GetLogger Overload List


CommonLoggingTraceListener Class

A TraceListener implementation sending all System.Diagnostics.Trace output to the Common.Logging infrastructure.

For a list of all members of this type, see CommonLoggingTraceListener Members .

System.Object
MarshalByRefObject
TraceListener
CommonLoggingTraceListener

[Visual Basic]
Public Class CommonLoggingTraceListener
Inherits TraceListener
[C#]
public class CommonLoggingTraceListener : TraceListener

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

This listener captures all output sent by calls to System.Diagnostics.Trace and and TraceSource and sends it to an ILog instance.
The ILog instance to be used is obtained by calling GetLogger. The name of the logger is created by passing this listener's Name and any source or category passed into this listener (see WriteLine or TraceEvent for example).

Example

The snippet below shows how to add and configure this listener to your app.config:

[XML]
<system.diagnostics>
  <sharedListeners>
    <add name="Diagnostics"
         type="Common.Logging.Simple.CommonLoggingTraceListener, Common.Logging"
         initializeData="DefaultTraceEventType=Information; LoggerNameFormat={listenerName}.{sourceName}">
      <filter type="System.Diagnostics.EventTypeFilter" initializeData="Information"/>
    </add>
  </sharedListeners>
  <trace>
    <listeners>
      <add name="Diagnostics" />
    </listeners>
  </trace>
</system.diagnostics>

Requirements

Namespace: Common.Logging.Simple

Assembly: Common.Logging (in Common.Logging.dll)

See Also

CommonLoggingTraceListener Members | Common.Logging.Simple Namespace


CommonLoggingTraceListener Members

CommonLoggingTraceListener overview

Public Instance Constructors

CommonLoggingTraceListener Overloaded. Initializes a new instance of the CommonLoggingTraceListener class.

Public Instance Properties

Attributes (inherited from TraceListener) |
DefaultTraceEventType | Sets the default TraceEventType to use for logging all events emitted by Trace .Write(...) and Trace.WriteLine(...) methods.
Filter (inherited from TraceListener) |
IndentLevel (inherited from TraceListener) |
IndentSize (inherited from TraceListener) |
IsThreadSafe (inherited from TraceListener) |
LoggerNameFormat | Format to use for creating the logger name. Defaults to "{listenerName}.{sourceName}".
Name (inherited from TraceListener) |
TraceOutputOptions (inherited from TraceListener) |

Public Instance Methods

Close (inherited from TraceListener) |
CreateObjRef (inherited from MarshalByRefObject) |
Dispose (inherited from TraceListener) | Overloaded.
Equals (inherited from Object) |
Fail (inherited from TraceListener) | Overloaded.
Flush (inherited from TraceListener) |
GetHashCode (inherited from Object) |
GetLifetimeService (inherited from MarshalByRefObject) |
GetType (inherited from Object) |
InitializeLifetimeService (inherited from MarshalByRefObject) |
ToString (inherited from Object) |
TraceData | Overloaded. Writes message to logger provided by GetLogger
TraceEvent | Overloaded. Writes message to logger provided by GetLogger
TraceTransfer (inherited from TraceListener) |
Write | Overloaded. Writes message to logger provided by GetLogger.
WriteLine | Overloaded. Writes message to logger provided by GetLogger.

Protected Instance Properties

NeedIndent (inherited from TraceListener)

Protected Instance Methods

Dispose (inherited from TraceListener) | Overloaded.
Finalize (inherited from Object) |
GetSupportedAttributes (inherited from TraceListener) |
Log | Logs the given message to the Common.Logging infrastructure.
MemberwiseClone (inherited from MarshalByRefObject) | Overloaded.
MemberwiseClone (inherited from Object) | Overloaded.
WriteIndent (inherited from TraceListener) |

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace


CommonLoggingTraceListener Constructor

Creates a new instance with the default name "Diagnostics" and LogLevel "Trace".

Overload List

Creates a new instance with the default name "Diagnostics" and LogLevel "Trace".

public CommonLoggingTraceListener()

Creates a new instance initialized with the specified properties.

public CommonLoggingTraceListener(NameValueCollection)

Creates a new instance initialized with properties from the initializeData. string.

public CommonLoggingTraceListener(string)

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace


CommonLoggingTraceListener Constructor

Creates a new instance with the default name "Diagnostics" and LogLevel "Trace".

[Visual Basic]
Public Overloads Sub New()
[C#]
CommonLoggingTraceListener();

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener Constructor Overload List


CommonLoggingTraceListener Constructor

Creates a new instance initialized with properties from the initializeData. string.

[Visual Basic]
Public Overloads Sub New( _
ByVal initializeData As String _
)
[C#]
CommonLoggingTraceListener(
string initializeData
);

Parameters

initializeData
a semicolon separated list of name/value pairs.

Remarks

initializeData is a semicolon separated string of name/value pairs, where each pair has the form key=value. E.g. "Name=MyLoggerName;LogLevel=Debug"

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener Constructor Overload List


CommonLoggingTraceListener Constructor

Creates a new instance initialized with the specified properties.

[Visual Basic]
Public Overloads Sub New( _
ByVal properties As NameValueCollection _
)
[C#]
CommonLoggingTraceListener(
NameValueCollection properties
);

Parameters

properties
name/value configuration properties.

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener Constructor Overload List


CommonLoggingTraceListener Properties

The properties of the CommonLoggingTraceListener class are listed below. For a complete list of CommonLoggingTraceListener class members, see the CommonLoggingTraceListener Members topic.

Public Instance Properties

Attributes (inherited from TraceListener) |
DefaultTraceEventType | Sets the default TraceEventType to use for logging all events emitted by Trace .Write(...) and Trace.WriteLine(...) methods.
Filter (inherited from TraceListener) |
IndentLevel (inherited from TraceListener) |
IndentSize (inherited from TraceListener) |
IsThreadSafe (inherited from TraceListener) |
LoggerNameFormat | Format to use for creating the logger name. Defaults to "{listenerName}.{sourceName}".
Name (inherited from TraceListener) |
TraceOutputOptions (inherited from TraceListener) |

Protected Instance Properties

NeedIndent (inherited from TraceListener)

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace


DefaultTraceEventType Property

Common Logging 2.0 API Reference

CommonLoggingTraceListener.DefaultTraceEventType Property

Sets the default TraceEventType to use for logging all events emitted by Trace .Write(...) and Trace.WriteLine(...) methods.

[Visual Basic]
Public Property DefaultTraceEventType() As TraceEventType
Public Get
End Get
Public Set
End Set
End Property
[C#]
public TraceEventType DefaultTraceEventType { public get; public set; }

Remarks

This listener captures all output sent by calls to Trace and sends it to an ILog instance using the LogLevel specified on LogLevel.

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace


LoggerNameFormat Property

Common Logging 2.0 API Reference

CommonLoggingTraceListener.LoggerNameFormat Property

Format to use for creating the logger name. Defaults to "{listenerName}.{sourceName}".

[Visual Basic]
Public Property LoggerNameFormat() As String
Public Get
End Get
Public Set
End Set
End Property
[C#]
public string LoggerNameFormat { public get; public set; }

Remarks

Available placeholders are:

  • {listenerName}: the configured name of this listener instance.
  • {sourceName}: the trace source name an event originates from (see e.g. TraceEvent.

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace


CommonLoggingTraceListener Methods

The methods of the CommonLoggingTraceListener class are listed below. For a complete list of CommonLoggingTraceListener class members, see the CommonLoggingTraceListener Members topic.

Public Instance Methods

Close (inherited from TraceListener) |
CreateObjRef (inherited from MarshalByRefObject) |
Dispose (inherited from TraceListener) | Overloaded.
Equals (inherited from Object) |
Fail (inherited from TraceListener) | Overloaded.
Flush (inherited from TraceListener) |
GetHashCode (inherited from Object) |
GetLifetimeService (inherited from MarshalByRefObject) |
GetType (inherited from Object) |
InitializeLifetimeService (inherited from MarshalByRefObject) |
ToString (inherited from Object) |
TraceData | Overloaded. Writes message to logger provided by GetLogger
TraceEvent | Overloaded. Writes message to logger provided by GetLogger
TraceTransfer (inherited from TraceListener) |
Write | Overloaded. Writes message to logger provided by GetLogger.
WriteLine | Overloaded. Writes message to logger provided by GetLogger.

Protected Instance Methods

Dispose (inherited from TraceListener) | Overloaded.
Finalize (inherited from Object) |
GetSupportedAttributes (inherited from TraceListener) |
Log | Logs the given message to the Common.Logging infrastructure.
MemberwiseClone (inherited from MarshalByRefObject) | Overloaded.
MemberwiseClone (inherited from Object) | Overloaded.
WriteIndent (inherited from TraceListener) |

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace


CommonLoggingTraceListener.Log Method

Logs the given message to the Common.Logging infrastructure.

[Visual Basic]
Protected Overridable Sub Log( _
ByVal eventType As TraceEventType, _
ByVal source As String, _
ByVal id As Integer, _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
protected virtual void Log(
TraceEventType eventType,
string source,
int id,
string format,
params object[] args
);

Parameters

eventType
the eventType
source
the TraceSource name or category name passed into e.g. Write.
id
the id of this event
format
the message format
args
the message arguments

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace


TraceData Method

Common Logging 2.0 API Reference

CommonLoggingTraceListener.TraceData Method

Writes message to logger provided by GetLogger

Overload List

Writes message to logger provided by GetLogger

public override void TraceData(TraceEventCache,string,TraceEventType,int,object)

Writes message to logger provided by GetLogger

public override void TraceData(TraceEventCache,string,TraceEventType,int,params object[])

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace


CommonLoggingTraceListener.TraceData(TraceEventCache, String, TraceEventType, Int32, Object) Method

Writes message to logger provided by GetLogger

[Visual Basic]
Public Overrides Overloads Sub TraceData( _
ByVal eventCache As TraceEventCache, _
ByVal source As String, _
ByVal eventType As TraceEventType, _
ByVal id As Integer, _
ByVal data As Object _
)
[C#]
public override void TraceData(
TraceEventCache eventCache,
string source,
TraceEventType eventType,
int id,
object data
);

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener.TraceData Overload List


CommonLoggingTraceListener.TraceData(TraceEventCache, String, TraceEventType, Int32, Object) Method

Writes message to logger provided by GetLogger

[Visual Basic]
Public Overrides Overloads Sub TraceData( _
ByVal eventCache As TraceEventCache, _
ByVal source As String, _
ByVal eventType As TraceEventType, _
ByVal id As Integer, _
ParamArray data As Object _
)
[C#]
public override void TraceData(
TraceEventCache eventCache,
string source,
TraceEventType eventType,
int id,
params object[] data
);

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener.TraceData Overload List


TraceEvent Method

Common Logging 2.0 API Reference

CommonLoggingTraceListener.TraceEvent Method

Writes message to logger provided by GetLogger

Overload List

Writes message to logger provided by GetLogger

public override void TraceEvent(TraceEventCache,string,TraceEventType,int)

Writes message to logger provided by GetLogger

public override void TraceEvent(TraceEventCache,string,TraceEventType,int,string)

Writes message to logger provided by GetLogger

public override void TraceEvent(TraceEventCache,string,TraceEventType,int,string,params object[])

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace


CommonLoggingTraceListener.TraceEvent(TraceEventCache, String, TraceEventType, Int32) Method

Writes message to logger provided by GetLogger

[Visual Basic]
Public Overrides Overloads Sub TraceEvent( _
ByVal eventCache As TraceEventCache, _
ByVal source As String, _
ByVal eventType As TraceEventType, _
ByVal id As Integer _
)
[C#]
public override void TraceEvent(
TraceEventCache eventCache,
string source,
TraceEventType eventType,
int id
);

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener.TraceEvent Overload List


CommonLoggingTraceListener.TraceEvent(TraceEventCache, String, TraceEventType, Int32, String) Method

Writes message to logger provided by GetLogger

[Visual Basic]
Public Overrides Overloads Sub TraceEvent( _
ByVal eventCache As TraceEventCache, _
ByVal source As String, _
ByVal eventType As TraceEventType, _
ByVal id As Integer, _
ByVal message As String _
)
[C#]
public override void TraceEvent(
TraceEventCache eventCache,
string source,
TraceEventType eventType,
int id,
string message
);

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener.TraceEvent Overload List


CommonLoggingTraceListener.TraceEvent(TraceEventCache, String, TraceEventType, Int32, String, Object) Method

Writes message to logger provided by GetLogger

[Visual Basic]
Public Overrides Overloads Sub TraceEvent( _
ByVal eventCache As TraceEventCache, _
ByVal source As String, _
ByVal eventType As TraceEventType, _
ByVal id As Integer, _
ByVal message As String, _
ParamArray args As Object _
)
[C#]
public override void TraceEvent(
TraceEventCache eventCache,
string source,
TraceEventType eventType,
int id,
string message,
params object[] args
);

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener.TraceEvent Overload List


Write Method

Common Logging 2.0 API Reference

CommonLoggingTraceListener.Write Method

Writes message to logger provided by GetLogger.

Overload List

Writes message to logger provided by GetLogger.

public override void Write(object)

Writes message to logger provided by GetLogger.

public override void Write(object,string)

Writes message to logger provided by GetLogger.

public override void Write(string)

Writes message to logger provided by GetLogger.

public override void Write(string,string)

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace


CommonLoggingTraceListener.Write(Object) Method

Writes message to logger provided by GetLogger.

[Visual Basic]
Public Overrides Overloads Sub Write( _
ByVal o As Object _
)
[C#]
public override void Write(
object o
);

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener.Write Overload List


CommonLoggingTraceListener.Write(Object, String) Method

Writes message to logger provided by GetLogger.

[Visual Basic]
Public Overrides Overloads Sub Write( _
ByVal o As Object, _
ByVal category As String _
)
[C#]
public override void Write(
object o,
string category
);

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener.Write Overload List


CommonLoggingTraceListener.Write(String) Method

Writes message to logger provided by GetLogger.

[Visual Basic]
Public Overrides Overloads Sub Write( _
ByVal message As String _
)
[C#]
public override void Write(
string message
);

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener.Write Overload List


CommonLoggingTraceListener.Write(String, String) Method

Writes message to logger provided by GetLogger.

[Visual Basic]
Public Overrides Overloads Sub Write( _
ByVal message As String, _
ByVal category As String _
)
[C#]
public override void Write(
string message,
string category
);

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener.Write Overload List


WriteLine Method

Common Logging 2.0 API Reference

CommonLoggingTraceListener.WriteLine Method

Writes message to logger provided by GetLogger.

Overload List

Writes message to logger provided by GetLogger.

public override void WriteLine(object)

Writes message to logger provided by GetLogger.

public override void WriteLine(object,string)

Writes message to logger provided by GetLogger.

public override void WriteLine(string)

Writes message to logger provided by GetLogger

public override void WriteLine(string,string)

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace


CommonLoggingTraceListener.WriteLine(Object) Method

Writes message to logger provided by GetLogger.

[Visual Basic]
Public Overrides Overloads Sub WriteLine( _
ByVal o As Object _
)
[C#]
public override void WriteLine(
object o
);

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener.WriteLine Overload List


CommonLoggingTraceListener.WriteLine(Object, String) Method

Writes message to logger provided by GetLogger.

[Visual Basic]
Public Overrides Overloads Sub WriteLine( _
ByVal o As Object, _
ByVal category As String _
)
[C#]
public override void WriteLine(
object o,
string category
);

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener.WriteLine Overload List


CommonLoggingTraceListener.WriteLine(String) Method

Writes message to logger provided by GetLogger.

[Visual Basic]
Public Overrides Overloads Sub WriteLine( _
ByVal message As String _
)
[C#]
public override void WriteLine(
string message
);

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener.WriteLine Overload List


CommonLoggingTraceListener.WriteLine(String, String) Method

Writes message to logger provided by GetLogger

[Visual Basic]
Public Overrides Overloads Sub WriteLine( _
ByVal message As String, _
ByVal category As String _
)
[C#]
public override void WriteLine(
string message,
string category
);

See Also

CommonLoggingTraceListener Class | Common.Logging.Simple Namespace | CommonLoggingTraceListener.WriteLine Overload List


ConsoleOutLogger Class

Sends log messages to Out.

For a list of all members of this type, see ConsoleOutLogger Members .

System.Object
AbstractLogger
AbstractSimpleLogger
ConsoleOutLogger

[Visual Basic]
<Serializable> _
Public Class ConsoleOutLogger
Inherits AbstractSimpleLogger
[C#]
[Serializable]
public class ConsoleOutLogger : AbstractSimpleLogger

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.Simple

Assembly: Common.Logging (in Common.Logging.dll)

See Also

ConsoleOutLogger Members | Common.Logging.Simple Namespace


ConsoleOutLogger Members

ConsoleOutLogger overview

Public Instance Constructors

ConsoleOutLogger Constructor Creates and initializes a logger that writes messages to Out.

Public Instance Properties

CurrentLogLevel (inherited from AbstractSimpleLogger) | The current logging threshold. Messages recieved that are beneath this threshold will not be logged.
DateTimeFormat (inherited from AbstractSimpleLogger) | The date and time format to use in the log message.
HasDateTimeFormat (inherited from AbstractSimpleLogger) | Determines Whether DateTimeFormat is set.
IsDebugEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Debug. If it is, all messages will be sent to Out.
IsErrorEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Error. If it is, only messages with a LogLevel of Error and Fatal will be sent to Out.
IsFatalEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Fatal. If it is, only messages with a LogLevel of Fatal will be sent to Out.
IsInfoEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Info. If it is, only messages with a LogLevel of Info, Warn, Error, and Fatal will be sent to Out.
IsTraceEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Trace. If it is, all messages will be sent to Out.
IsWarnEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Warn. If it is, only messages with a LogLevel of Warn, Error, and Fatal will be sent to Out.
Name (inherited from AbstractSimpleLogger) | The name of the logger.
ShowDateTime (inherited from AbstractSimpleLogger) | Include the current time in the log message.
ShowLevel (inherited from AbstractSimpleLogger) | Include the current log level in the log message.
ShowLogName (inherited from AbstractSimpleLogger) | Include the instance name in the log message.

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Methods

Finalize (inherited from Object) |
FormatOutput (inherited from AbstractSimpleLogger) | Appends the formatted message to the specified StringBuilder.
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
IsLevelEnabled (inherited from AbstractSimpleLogger) | Determines if the given log level is currently enabled.
MemberwiseClone (inherited from Object) |
WriteInternal | Do the actual logging by constructing the log message using a StringBuilder then sending the output to Out.

See Also

ConsoleOutLogger Class | Common.Logging.Simple Namespace


ConsoleOutLogger Constructor

Creates and initializes a logger that writes messages to Out.

[Visual Basic]
Public Sub New( _
ByVal logName As String, _
ByVal logLevel As LogLevel, _
ByVal showLevel As Boolean, _
ByVal showDateTime As Boolean, _
ByVal showLogName As Boolean, _
ByVal dateTimeFormat As String _
)
[C#]
ConsoleOutLogger(
string logName,
LogLevel logLevel,
bool showLevel,
bool showDateTime,
bool showLogName,
string dateTimeFormat
);

Parameters

logName
The name, usually type name of the calling class, of the logger.
logLevel
The current logging threshold. Messages recieved that are beneath this threshold will not be logged.
showLevel
Include the current log level in the log message.
showDateTime
Include the current time in the log message.
showLogName
Include the instance name in the log message.
dateTimeFormat
The date and time format to use in the log message.

See Also

ConsoleOutLogger Class | Common.Logging.Simple Namespace


ConsoleOutLogger Methods

The methods of the ConsoleOutLogger class are listed below. For a complete list of ConsoleOutLogger class members, see the ConsoleOutLogger Members topic.

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Methods

Finalize (inherited from Object) |
FormatOutput (inherited from AbstractSimpleLogger) | Appends the formatted message to the specified StringBuilder.
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
IsLevelEnabled (inherited from AbstractSimpleLogger) | Determines if the given log level is currently enabled.
MemberwiseClone (inherited from Object) |
WriteInternal | Do the actual logging by constructing the log message using a StringBuilder then sending the output to Out.

See Also

ConsoleOutLogger Class | Common.Logging.Simple Namespace


ConsoleOutLogger.WriteInternal Method

Do the actual logging by constructing the log message using a StringBuilder then sending the output to Out.

[Visual Basic]
Protected Overrides Sub WriteInternal( _
ByVal level As LogLevel, _
ByVal message As Object, _
ByVal e As Exception _
)
[C#]
protected override void WriteInternal(
LogLevel level,
object message,
Exception e
);

Parameters

level
The LogLevel of the message.
message
The log message.
e
An optional Exception associated with the message.

See Also

ConsoleOutLogger Class | Common.Logging.Simple Namespace


ConsoleOutLoggerFactoryAdapter Class

Factory for creating ILog instances that write data to Out.

For a list of all members of this type, see ConsoleOutLoggerFactoryAdapter Members .

System.Object
AbstractCachingLoggerFactoryAdapter
AbstractSimpleLoggerFactoryAdapter
ConsoleOutLoggerFactoryAdapter

[Visual Basic]
Public Class ConsoleOutLoggerFactoryAdapter
Inherits AbstractSimpleLoggerFactoryAdapter
[C#]
public class ConsoleOutLoggerFactoryAdapter : AbstractSimpleLoggerFactoryAdapter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.Simple

Assembly: Common.Logging (in Common.Logging.dll)

See Also

ConsoleOutLoggerFactoryAdapter Members | Common.Logging.Simple Namespace | AbstractSimpleLoggerFactoryAdapter | Adapter | ConfigurationSectionHandler


ConsoleOutLoggerFactoryAdapter Members

ConsoleOutLoggerFactoryAdapter overview

Public Instance Constructors

ConsoleOutLoggerFactoryAdapter Overloaded. Initializes a new instance of the ConsoleOutLoggerFactoryAdapter class.

Public Instance Properties

DateTimeFormat (inherited from AbstractSimpleLoggerFactoryAdapter) | The default setting to use when creating new ILog instances.
Level (inherited from AbstractSimpleLoggerFactoryAdapter) | The default LogLevel to use when creating new ILog instances.
ShowDateTime (inherited from AbstractSimpleLoggerFactoryAdapter) | The default setting to use when creating new ILog instances.
ShowLevel (inherited from AbstractSimpleLoggerFactoryAdapter) | The default setting to use when creating new ILog instances.
ShowLogName (inherited from AbstractSimpleLoggerFactoryAdapter) | The default setting to use when creating new ILog instances.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Overloaded. Creates a new ConsoleOutLogger instance.
CreateLogger (inherited from AbstractSimpleLoggerFactoryAdapter) | Overloaded. Create the specified logger instance
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

ConsoleOutLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | AbstractSimpleLoggerFactoryAdapter | Adapter | ConfigurationSectionHandler


ConsoleOutLoggerFactoryAdapter Constructor

Initializes a new instance of the ConsoleOutLoggerFactoryAdapter class using default settings.

Overload List

Initializes a new instance of the ConsoleOutLoggerFactoryAdapter class using default settings.

public ConsoleOutLoggerFactoryAdapter()

Initializes a new instance of the ConsoleOutLoggerFactoryAdapter class.

public ConsoleOutLoggerFactoryAdapter(NameValueCollection)

See Also

ConsoleOutLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


ConsoleOutLoggerFactoryAdapter Constructor

Initializes a new instance of the ConsoleOutLoggerFactoryAdapter class using default settings.

[Visual Basic]
Public Overloads Sub New()
[C#]
ConsoleOutLoggerFactoryAdapter();

See Also

ConsoleOutLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | ConsoleOutLoggerFactoryAdapter Constructor Overload List


ConsoleOutLoggerFactoryAdapter Constructor

Initializes a new instance of the ConsoleOutLoggerFactoryAdapter class.

[Visual Basic]
Public Overloads Sub New( _
ByVal properties As NameValueCollection _
)
[C#]
ConsoleOutLoggerFactoryAdapter(
NameValueCollection properties
);

Parameters

properties
The name value collection, typically specified by the user in a configuration section named common/logging.

Remarks

Looks for level, showDateTime, showLogName, dateTimeFormat items from properties for use when the GetLogger methods are called. ConfigurationSectionHandler for more information on how to use the standard .NET application configuraiton file (App.config/Web.config) to configure this adapter.

See Also

ConsoleOutLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | ConsoleOutLoggerFactoryAdapter Constructor Overload List


ConsoleOutLoggerFactoryAdapter Methods

The methods of the ConsoleOutLoggerFactoryAdapter class are listed below. For a complete list of ConsoleOutLoggerFactoryAdapter class members, see the ConsoleOutLoggerFactoryAdapter Members topic.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Overloaded. Creates a new ConsoleOutLogger instance.
CreateLogger (inherited from AbstractSimpleLoggerFactoryAdapter) | Overloaded. Create the specified logger instance
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

ConsoleOutLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | AbstractSimpleLoggerFactoryAdapter | Adapter | ConfigurationSectionHandler


CreateLogger Method

Common Logging 2.0 API Reference

ConsoleOutLoggerFactoryAdapter.CreateLogger Method

Creates a new ConsoleOutLogger instance.

Overload List

Inherited from AbstractSimpleLoggerFactoryAdapter.

protected override ILog CreateLogger(string)

Creates a new ConsoleOutLogger instance.

protected override ILog CreateLogger(string,LogLevel,bool,bool,bool,string)

See Also

ConsoleOutLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


ConsoleOutLoggerFactoryAdapter.CreateLogger(String, LogLevel, Boolean, Boolean, Boolean, String) Method

Creates a new ConsoleOutLogger instance.

[Visual Basic]
Protected Overrides Overloads Sub CreateLogger( _
ByVal name As String, _
ByVal level As LogLevel, _
ByVal showLevel As Boolean, _
ByVal showDateTime As Boolean, _
ByVal showLogName As Boolean, _
ByVal dateTimeFormat As String _
)
[C#]
protected override ILog CreateLogger(
string name,
LogLevel level,
bool showLevel,
bool showDateTime,
bool showLogName,
string dateTimeFormat
);

See Also

ConsoleOutLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | ConsoleOutLoggerFactoryAdapter.CreateLogger Overload List


NoOpLogger Class

Silently ignores all log messages.

For a list of all members of this type, see NoOpLogger Members .

System.Object
NoOpLogger

[Visual Basic]
<Serializable> _
Public NotInheritable Class NoOpLogger
Implements ILog
[C#]
[Serializable]
public sealed class NoOpLogger : ILog

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.Simple

Assembly: Common.Logging (in Common.Logging.dll)

See Also

NoOpLogger Members | Common.Logging.Simple Namespace


NoOpLogger Members

NoOpLogger overview

Public Instance Constructors

NoOpLogger Constructor Initializes a new instance of the NoOpLogger class.

Public Instance Properties

IsDebugEnabled | Always returns false.
IsErrorEnabled | Always returns false.
IsFatalEnabled | Always returns false.
IsInfoEnabled | Always returns false.
IsTraceEnabled | Always returns false.
IsWarnEnabled | Always returns false.

Public Instance Methods

Debug | Overloaded. Ignores message.
DebugFormat | Overloaded. Ignores message.
Equals (inherited from Object) |
Error | Overloaded. Ignores message.
ErrorFormat | Overloaded. Ignores message.
Fatal | Overloaded. Ignores message.
FatalFormat | Overloaded. Ignores message.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info | Overloaded. Ignores message.
InfoFormat | Overloaded. Ignores message.
ToString (inherited from Object) |
Trace | Overloaded. Ignores message.
TraceFormat | Overloaded. Ignores message.
Warn | Overloaded. Ignores message.
WarnFormat | Overloaded. Ignores message.

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


NoOpLogger Constructor

Initializes a new instance of the NoOpLogger class.

[Visual Basic]
Public Sub New()
[C#]
NoOpLogger();

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


NoOpLogger Properties

The properties of the NoOpLogger class are listed below. For a complete list of NoOpLogger class members, see the NoOpLogger Members topic.

Public Instance Properties

IsDebugEnabled | Always returns false.
IsErrorEnabled | Always returns false.
IsFatalEnabled | Always returns false.
IsInfoEnabled | Always returns false.
IsTraceEnabled | Always returns false.
IsWarnEnabled | Always returns false.

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


IsDebugEnabled Property

Common Logging 2.0 API Reference

NoOpLogger.IsDebugEnabled Property

Always returns false.

[Visual Basic]
Public NotOverridable ReadOnly Property IsDebugEnabled() As Boolean _
Implements ILog.IsDebugEnabled

Public Get
End Get
End Property
[C#]
public bool IsDebugEnabled { public get; }

Implements

ILog.IsDebugEnabled

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


IsErrorEnabled Property

Common Logging 2.0 API Reference

NoOpLogger.IsErrorEnabled Property

Always returns false.

[Visual Basic]
Public NotOverridable ReadOnly Property IsErrorEnabled() As Boolean _
Implements ILog.IsErrorEnabled

Public Get
End Get
End Property
[C#]
public bool IsErrorEnabled { public get; }

Implements

ILog.IsErrorEnabled

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


IsFatalEnabled Property

Common Logging 2.0 API Reference

NoOpLogger.IsFatalEnabled Property

Always returns false.

[Visual Basic]
Public NotOverridable ReadOnly Property IsFatalEnabled() As Boolean _
Implements ILog.IsFatalEnabled

Public Get
End Get
End Property
[C#]
public bool IsFatalEnabled { public get; }

Implements

ILog.IsFatalEnabled

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


IsInfoEnabled Property

Common Logging 2.0 API Reference

NoOpLogger.IsInfoEnabled Property

Always returns false.

[Visual Basic]
Public NotOverridable ReadOnly Property IsInfoEnabled() As Boolean _
Implements ILog.IsInfoEnabled

Public Get
End Get
End Property
[C#]
public bool IsInfoEnabled { public get; }

Implements

ILog.IsInfoEnabled

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


IsTraceEnabled Property

Common Logging 2.0 API Reference

NoOpLogger.IsTraceEnabled Property

Always returns false.

[Visual Basic]
Public NotOverridable ReadOnly Property IsTraceEnabled() As Boolean _
Implements ILog.IsTraceEnabled

Public Get
End Get
End Property
[C#]
public bool IsTraceEnabled { public get; }

Implements

ILog.IsTraceEnabled

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


IsWarnEnabled Property

Common Logging 2.0 API Reference

NoOpLogger.IsWarnEnabled Property

Always returns false.

[Visual Basic]
Public NotOverridable ReadOnly Property IsWarnEnabled() As Boolean _
Implements ILog.IsWarnEnabled

Public Get
End Get
End Property
[C#]
public bool IsWarnEnabled { public get; }

Implements

ILog.IsWarnEnabled

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


NoOpLogger Methods

The methods of the NoOpLogger class are listed below. For a complete list of NoOpLogger class members, see the NoOpLogger Members topic.

Public Instance Methods

Debug | Overloaded. Ignores message.
DebugFormat | Overloaded. Ignores message.
Equals (inherited from Object) |
Error | Overloaded. Ignores message.
ErrorFormat | Overloaded. Ignores message.
Fatal | Overloaded. Ignores message.
FatalFormat | Overloaded. Ignores message.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info | Overloaded. Ignores message.
InfoFormat | Overloaded. Ignores message.
ToString (inherited from Object) |
Trace | Overloaded. Ignores message.
TraceFormat | Overloaded. Ignores message.
Warn | Overloaded. Ignores message.
WarnFormat | Overloaded. Ignores message.

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


Debug Method

Common Logging 2.0 API Reference

NoOpLogger.Debug Method

Ignores message.

Overload List

Ignores message.

public void Debug(Action<FormatMessageHandler>)

Ignores message.

public void Debug(Action<FormatMessageHandler>,Exception)

Ignores message.

public void Debug(IFormatProvider,Action<FormatMessageHandler>)

Ignores message.

public void Debug(IFormatProvider,Action<FormatMessageHandler>,Exception)

Ignores message.

public void Debug(object)

Ignores message.

public void Debug(object,Exception)

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


NoOpLogger.Debug(Action) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Debug( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Debug
[C#]
public void Debug(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Debug

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Debug Overload List


NoOpLogger.Debug(Action, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Debug( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Debug
[C#]
public void Debug(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Debug.

Implements

ILog.Debug

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Debug Overload List


NoOpLogger.Debug(IFormatProvider, Action) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Debug( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Debug
[C#]
public void Debug(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Debug

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Debug Overload List


NoOpLogger.Debug(IFormatProvider, Action, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Debug( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Debug
[C#]
public void Debug(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Debug.

Implements

ILog.Debug

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Debug Overload List


NoOpLogger.Debug(Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Debug( _
ByVal message As Object _
) _
Implements ILog.Debug
[C#]
public void Debug(
object message
);

Parameters

message

Implements

ILog.Debug

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Debug Overload List


NoOpLogger.Debug(Object, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Debug( _
ByVal message As Object, _
ByVal e As Exception _
) _
Implements ILog.Debug
[C#]
public void Debug(
object message,
Exception e
);

Parameters

message
e

Implements

ILog.Debug

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Debug Overload List


DebugFormat Method

Common Logging 2.0 API Reference

NoOpLogger.DebugFormat Method

Ignores message.

Overload List

Ignores message.

public void DebugFormat(IFormatProvider,string,Exception,params object[])

Ignores message.

public void DebugFormat(IFormatProvider,string,params object[])

Ignores message.

public void DebugFormat(string,Exception,params object[])

Ignores message.

public void DebugFormat(string,params object[])

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


NoOpLogger.DebugFormat(IFormatProvider, String, Exception, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub DebugFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.DebugFormat
[C#]
public void DebugFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
exception
The exception to log.
args
the list of message format arguments

Implements

ILog.DebugFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.DebugFormat Overload List


NoOpLogger.DebugFormat(IFormatProvider, String, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub DebugFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.DebugFormat
[C#]
public void DebugFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
args
the list of message format arguments

Implements

ILog.DebugFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.DebugFormat Overload List


NoOpLogger.DebugFormat(String, Exception, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub DebugFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.DebugFormat
[C#]
public void DebugFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of message format arguments

Implements

ILog.DebugFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.DebugFormat Overload List


NoOpLogger.DebugFormat(String, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub DebugFormat( _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.DebugFormat
[C#]
public void DebugFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args

Implements

ILog.DebugFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.DebugFormat Overload List


Error Method

Common Logging 2.0 API Reference

NoOpLogger.Error Method

Ignores message.

Overload List

Ignores message.

public void Error(Action<FormatMessageHandler>)

Ignores message.

public void Error(Action<FormatMessageHandler>,Exception)

Ignores message.

public void Error(IFormatProvider,Action<FormatMessageHandler>)

Ignores message.

public void Error(IFormatProvider,Action<FormatMessageHandler>,Exception)

Ignores message.

public void Error(object)

Ignores message.

public void Error(object,Exception)

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


NoOpLogger.Error(Action) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Error( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Error
[C#]
public void Error(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Error

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Error Overload List


NoOpLogger.Error(Action, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Error( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Error
[C#]
public void Error(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Error.

Implements

ILog.Error

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Error Overload List


NoOpLogger.Error(IFormatProvider, Action) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Error( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Error
[C#]
public void Error(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Error

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Error Overload List


NoOpLogger.Error(IFormatProvider, Action, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Error( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Error
[C#]
public void Error(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Error.

Implements

ILog.Error

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Error Overload List


NoOpLogger.Error(Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Error( _
ByVal message As Object _
) _
Implements ILog.Error
[C#]
public void Error(
object message
);

Parameters

message

Implements

ILog.Error

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Error Overload List


NoOpLogger.Error(Object, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Error( _
ByVal message As Object, _
ByVal e As Exception _
) _
Implements ILog.Error
[C#]
public void Error(
object message,
Exception e
);

Parameters

message
e

Implements

ILog.Error

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Error Overload List


ErrorFormat Method

Common Logging 2.0 API Reference

NoOpLogger.ErrorFormat Method

Ignores message.

Overload List

Ignores message.

public void ErrorFormat(IFormatProvider,string,Exception,params object[])

Ignores message.

public void ErrorFormat(IFormatProvider,string,params object[])

Ignores message.

public void ErrorFormat(string,Exception,params object[])

Ignores message.

public void ErrorFormat(string,params object[])

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


NoOpLogger.ErrorFormat(IFormatProvider, String, Exception, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub ErrorFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.ErrorFormat
[C#]
public void ErrorFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting Errorrmation.
format
The format of the message object to log.Format
exception
The exception to log.
args
the list of message format arguments

Implements

ILog.ErrorFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.ErrorFormat Overload List


NoOpLogger.ErrorFormat(IFormatProvider, String, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub ErrorFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.ErrorFormat
[C#]
public void ErrorFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting Errorrmation.
format
The format of the message object to log.Format
args
the list of message format arguments

Implements

ILog.ErrorFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.ErrorFormat Overload List


NoOpLogger.ErrorFormat(String, Exception, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub ErrorFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.ErrorFormat
[C#]
public void ErrorFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of message format arguments

Implements

ILog.ErrorFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.ErrorFormat Overload List


NoOpLogger.ErrorFormat(String, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub ErrorFormat( _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.ErrorFormat
[C#]
public void ErrorFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args

Implements

ILog.ErrorFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.ErrorFormat Overload List


Fatal Method

Common Logging 2.0 API Reference

NoOpLogger.Fatal Method

Ignores message.

Overload List

Ignores message.

public void Fatal(Action<FormatMessageHandler>)

Ignores message.

public void Fatal(Action<FormatMessageHandler>,Exception)

Ignores message.

public void Fatal(IFormatProvider,Action<FormatMessageHandler>)

Ignores message.

public void Fatal(IFormatProvider,Action<FormatMessageHandler>,Exception)

Ignores message.

public void Fatal(object)

Ignores message.

public void Fatal(object,Exception)

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


NoOpLogger.Fatal(Action) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Fatal( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Fatal
[C#]
public void Fatal(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Fatal

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Fatal Overload List


NoOpLogger.Fatal(Action, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Fatal( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Fatal
[C#]
public void Fatal(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Fatal.

Implements

ILog.Fatal

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Fatal Overload List


NoOpLogger.Fatal(IFormatProvider, Action) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Fatal( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Fatal
[C#]
public void Fatal(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Fatal

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Fatal Overload List


NoOpLogger.Fatal(IFormatProvider, Action, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Fatal( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Fatal
[C#]
public void Fatal(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Fatal.

Implements

ILog.Fatal

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Fatal Overload List


NoOpLogger.Fatal(Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Fatal( _
ByVal message As Object _
) _
Implements ILog.Fatal
[C#]
public void Fatal(
object message
);

Parameters

message

Implements

ILog.Fatal

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Fatal Overload List


NoOpLogger.Fatal(Object, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Fatal( _
ByVal message As Object, _
ByVal e As Exception _
) _
Implements ILog.Fatal
[C#]
public void Fatal(
object message,
Exception e
);

Parameters

message
e

Implements

ILog.Fatal

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Fatal Overload List


FatalFormat Method

Common Logging 2.0 API Reference

NoOpLogger.FatalFormat Method

Ignores message.

Overload List

Ignores message.

public void FatalFormat(IFormatProvider,string,Exception,params object[])

Ignores message.

public void FatalFormat(IFormatProvider,string,params object[])

Ignores message.

public void FatalFormat(string,Exception,params object[])

Ignores message.

public void FatalFormat(string,params object[])

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


NoOpLogger.FatalFormat(IFormatProvider, String, Exception, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub FatalFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.FatalFormat
[C#]
public void FatalFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting Fatalrmation.
format
The format of the message object to log.Format
exception
The exception to log.
args
the list of message format arguments

Implements

ILog.FatalFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.FatalFormat Overload List


NoOpLogger.FatalFormat(IFormatProvider, String, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub FatalFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.FatalFormat
[C#]
public void FatalFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting Fatalrmation.
format
The format of the message object to log.Format
args
the list of message format arguments

Implements

ILog.FatalFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.FatalFormat Overload List


NoOpLogger.FatalFormat(String, Exception, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub FatalFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.FatalFormat
[C#]
public void FatalFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of message format arguments

Implements

ILog.FatalFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.FatalFormat Overload List


NoOpLogger.FatalFormat(String, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub FatalFormat( _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.FatalFormat
[C#]
public void FatalFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args

Implements

ILog.FatalFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.FatalFormat Overload List


Info Method

Common Logging 2.0 API Reference

NoOpLogger.Info Method

Ignores message.

Overload List

Ignores message.

public void Info(Action<FormatMessageHandler>)

Ignores message.

public void Info(Action<FormatMessageHandler>,Exception)

Ignores message.

public void Info(IFormatProvider,Action<FormatMessageHandler>)

Ignores message.

public void Info(IFormatProvider,Action<FormatMessageHandler>,Exception)

Ignores message.

public void Info(object)

Ignores message.

public void Info(object,Exception)

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


NoOpLogger.Info(Action) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Info( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Info
[C#]
public void Info(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Info

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Info Overload List


NoOpLogger.Info(Action, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Info( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Info
[C#]
public void Info(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Info.

Implements

ILog.Info

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Info Overload List


NoOpLogger.Info(IFormatProvider, Action) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Info( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Info
[C#]
public void Info(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Info

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Info Overload List


NoOpLogger.Info(IFormatProvider, Action, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Info( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Info
[C#]
public void Info(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Info.

Implements

ILog.Info

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Info Overload List


NoOpLogger.Info(Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Info( _
ByVal message As Object _
) _
Implements ILog.Info
[C#]
public void Info(
object message
);

Parameters

message

Implements

ILog.Info

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Info Overload List


NoOpLogger.Info(Object, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Info( _
ByVal message As Object, _
ByVal e As Exception _
) _
Implements ILog.Info
[C#]
public void Info(
object message,
Exception e
);

Parameters

message
e

Implements

ILog.Info

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Info Overload List


InfoFormat Method

Common Logging 2.0 API Reference

NoOpLogger.InfoFormat Method

Ignores message.

Overload List

Ignores message.

public void InfoFormat(IFormatProvider,string,Exception,params object[])

Ignores message.

public void InfoFormat(IFormatProvider,string,params object[])

Ignores message.

public void InfoFormat(string,Exception,params object[])

Ignores message.

public void InfoFormat(string,params object[])

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


NoOpLogger.InfoFormat(IFormatProvider, String, Exception, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub InfoFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.InfoFormat
[C#]
public void InfoFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
exception
The exception to log.
args
the list of message format arguments

Implements

ILog.InfoFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.InfoFormat Overload List


NoOpLogger.InfoFormat(IFormatProvider, String, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub InfoFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.InfoFormat
[C#]
public void InfoFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
args
the list of message format arguments

Implements

ILog.InfoFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.InfoFormat Overload List


NoOpLogger.InfoFormat(String, Exception, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub InfoFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.InfoFormat
[C#]
public void InfoFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of message format arguments

Implements

ILog.InfoFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.InfoFormat Overload List


NoOpLogger.InfoFormat(String, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub InfoFormat( _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.InfoFormat
[C#]
public void InfoFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args

Implements

ILog.InfoFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.InfoFormat Overload List


Trace Method

Common Logging 2.0 API Reference

NoOpLogger.Trace Method

Ignores message.

Overload List

Ignores message.

public void Trace(Action<FormatMessageHandler>)

Ignores message.

public void Trace(Action<FormatMessageHandler>,Exception)

Ignores message.

public void Trace(IFormatProvider,Action<FormatMessageHandler>)

Ignores message.

public void Trace(IFormatProvider,Action<FormatMessageHandler>,Exception)

Ignores message.

public void Trace(object)

Ignores message.

public void Trace(object,Exception)

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


NoOpLogger.Trace(Action) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Trace( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Trace
[C#]
public void Trace(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Trace

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Trace Overload List


NoOpLogger.Trace(Action, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Trace( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Trace
[C#]
public void Trace(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack trace.

Implements

ILog.Trace

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Trace Overload List


NoOpLogger.Trace(IFormatProvider, Action) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Trace( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Trace
[C#]
public void Trace(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Trace

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Trace Overload List


NoOpLogger.Trace(IFormatProvider, Action, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Trace( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Trace
[C#]
public void Trace(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack trace.

Implements

ILog.Trace

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Trace Overload List


NoOpLogger.Trace(Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Trace( _
ByVal message As Object _
) _
Implements ILog.Trace
[C#]
public void Trace(
object message
);

Parameters

message

Implements

ILog.Trace

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Trace Overload List


NoOpLogger.Trace(Object, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Trace( _
ByVal message As Object, _
ByVal e As Exception _
) _
Implements ILog.Trace
[C#]
public void Trace(
object message,
Exception e
);

Parameters

message
e

Implements

ILog.Trace

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Trace Overload List


TraceFormat Method

Common Logging 2.0 API Reference

NoOpLogger.TraceFormat Method

Ignores message.

Overload List

Ignores message.

public void TraceFormat(IFormatProvider,string,Exception,params object[])

Ignores message.

public void TraceFormat(IFormatProvider,string,params object[])

Ignores message.

public void TraceFormat(string,Exception,params object[])

Ignores message.

public void TraceFormat(string,params object[])

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


NoOpLogger.TraceFormat(IFormatProvider, String, Exception, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub TraceFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.TraceFormat
[C#]
public void TraceFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
exception
The exception to log.
args
the list of message format arguments

Implements

ILog.TraceFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.TraceFormat Overload List


NoOpLogger.TraceFormat(IFormatProvider, String, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub TraceFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.TraceFormat
[C#]
public void TraceFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
format
The format of the message object to log.Format
args
the list of message format arguments

Implements

ILog.TraceFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.TraceFormat Overload List


NoOpLogger.TraceFormat(String, Exception, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub TraceFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.TraceFormat
[C#]
public void TraceFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of message format arguments

Implements

ILog.TraceFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.TraceFormat Overload List


NoOpLogger.TraceFormat(String, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub TraceFormat( _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.TraceFormat
[C#]
public void TraceFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args

Implements

ILog.TraceFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.TraceFormat Overload List


Warn Method

Common Logging 2.0 API Reference

NoOpLogger.Warn Method

Ignores message.

Overload List

Ignores message.

public void Warn(Action<FormatMessageHandler>)

Ignores message.

public void Warn(Action<FormatMessageHandler>,Exception)

Ignores message.

public void Warn(IFormatProvider,Action<FormatMessageHandler>)

Ignores message.

public void Warn(IFormatProvider,Action<FormatMessageHandler>,Exception)

Ignores message.

public void Warn(object)

Ignores message.

public void Warn(object,Exception)

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


NoOpLogger.Warn(Action) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Warn( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Warn
[C#]
public void Warn(
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Warn

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Warn Overload List


NoOpLogger.Warn(Action, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Warn( _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Warn
[C#]
public void Warn(
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Warn.

Implements

ILog.Warn

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Warn Overload List


NoOpLogger.Warn(IFormatProvider, Action) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Warn( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler) _
) _
Implements ILog.Warn
[C#]
public void Warn(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched

Implements

ILog.Warn

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Warn Overload List


NoOpLogger.Warn(IFormatProvider, Action, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Warn( _
ByVal formatProvider As IFormatProvider, _
ByVal formatMessageCallback As Action(Of FormatMessageHandler), _
ByVal exception As Exception _
) _
Implements ILog.Warn
[C#]
public void Warn(
IFormatProvider formatProvider,
Action<FormatMessageHandler> formatMessageCallback,
Exception exception
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting information.
formatMessageCallback
A callback used by the logger to obtain the message if log level is matched
exception
The exception to log, including its stack Warn.

Implements

ILog.Warn

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Warn Overload List


NoOpLogger.Warn(Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Warn( _
ByVal message As Object _
) _
Implements ILog.Warn
[C#]
public void Warn(
object message
);

Parameters

message

Implements

ILog.Warn

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Warn Overload List


NoOpLogger.Warn(Object, Exception) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub Warn( _
ByVal message As Object, _
ByVal e As Exception _
) _
Implements ILog.Warn
[C#]
public void Warn(
object message,
Exception e
);

Parameters

message
e

Implements

ILog.Warn

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.Warn Overload List


WarnFormat Method

Common Logging 2.0 API Reference

NoOpLogger.WarnFormat Method

Ignores message.

Overload List

Ignores message.

public void WarnFormat(IFormatProvider,string,Exception,params object[])

Ignores message.

public void WarnFormat(IFormatProvider,string,params object[])

Ignores message.

public void WarnFormat(string,Exception,params object[])

Ignores message.

public void WarnFormat(string,params object[])

See Also

NoOpLogger Class | Common.Logging.Simple Namespace


NoOpLogger.WarnFormat(IFormatProvider, String, Exception, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub WarnFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.WarnFormat
[C#]
public void WarnFormat(
IFormatProvider formatProvider,
string format,
Exception exception,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting Warnrmation.
format
The format of the message object to log.Format
exception
The exception to log.
args
the list of message format arguments

Implements

ILog.WarnFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.WarnFormat Overload List


NoOpLogger.WarnFormat(IFormatProvider, String, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub WarnFormat( _
ByVal formatProvider As IFormatProvider, _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.WarnFormat
[C#]
public void WarnFormat(
IFormatProvider formatProvider,
string format,
params object[] args
);

Parameters

formatProvider
An IFormatProvider that supplies culture-specific formatting Warnrmation.
format
The format of the message object to log.Format
args
the list of message format arguments

Implements

ILog.WarnFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.WarnFormat Overload List


NoOpLogger.WarnFormat(String, Exception, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub WarnFormat( _
ByVal format As String, _
ByVal exception As Exception, _
ParamArray args As Object _
) _
Implements ILog.WarnFormat
[C#]
public void WarnFormat(
string format,
Exception exception,
params object[] args
);

Parameters

format
The format of the message object to log.Format
exception
The exception to log.
args
the list of message format arguments

Implements

ILog.WarnFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.WarnFormat Overload List


NoOpLogger.WarnFormat(String, Object) Method

Ignores message.

[Visual Basic]
Public NotOverridable Overloads Sub WarnFormat( _
ByVal format As String, _
ParamArray args As Object _
) _
Implements ILog.WarnFormat
[C#]
public void WarnFormat(
string format,
params object[] args
);

Parameters

format
The format of the message object to log.Format
args

Implements

ILog.WarnFormat

See Also

NoOpLogger Class | Common.Logging.Simple Namespace | NoOpLogger.WarnFormat Overload List


NoOpLoggerFactoryAdapter Class

Factory for creating ILog instances that silently ignores logging requests.

For a list of all members of this type, see NoOpLoggerFactoryAdapter Members .

System.Object
NoOpLoggerFactoryAdapter

[Visual Basic]
Public NotInheritable Class NoOpLoggerFactoryAdapter
Implements ILoggerFactoryAdapter
[C#]
public sealed class NoOpLoggerFactoryAdapter : ILoggerFactoryAdapter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.Simple

Assembly: Common.Logging (in Common.Logging.dll)

See Also

NoOpLoggerFactoryAdapter Members | Common.Logging.Simple Namespace | Adapter | ConfigurationSectionHandler


NoOpLoggerFactoryAdapter Members

NoOpLoggerFactoryAdapter overview

Public Instance Constructors

NoOpLoggerFactoryAdapter Overloaded. Initializes a new instance of the NoOpLoggerFactoryAdapter class.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger | Get a ILog instance by type
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

NoOpLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | Adapter | ConfigurationSectionHandler


NoOpLoggerFactoryAdapter Constructor

Constructor

Overload List

Constructor

public NoOpLoggerFactoryAdapter()

Constructor

public NoOpLoggerFactoryAdapter(NameValueCollection)

See Also

NoOpLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


NoOpLoggerFactoryAdapter Constructor

Constructor

[Visual Basic]
Public Overloads Sub New()
[C#]
NoOpLoggerFactoryAdapter();

See Also

NoOpLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | NoOpLoggerFactoryAdapter Constructor Overload List


NoOpLoggerFactoryAdapter Constructor

Constructor

[Visual Basic]
Public Overloads Sub New( _
ByVal properties As NameValueCollection _
)
[C#]
NoOpLoggerFactoryAdapter(
NameValueCollection properties
);

See Also

NoOpLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | NoOpLoggerFactoryAdapter Constructor Overload List


NoOpLoggerFactoryAdapter Methods

The methods of the NoOpLoggerFactoryAdapter class are listed below. For a complete list of NoOpLoggerFactoryAdapter class members, see the NoOpLoggerFactoryAdapter Members topic.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger | Get a ILog instance by type
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

NoOpLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | Adapter | ConfigurationSectionHandler


NoOpLoggerFactoryAdapter.GetLogger Method

Get a ILog instance by type

[Visual Basic]
Public NotOverridable Sub GetLogger( _
ByVal type As Type _
) _
Implements ILoggerFactoryAdapter.GetLogger
[C#]
public ILog GetLogger(
Type type
);

Parameters

type

Return Value

Implements

ILoggerFactoryAdapter.GetLogger

See Also

NoOpLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


TraceLogger Class

Logger sending everything to the trace output stream using Trace.

For a list of all members of this type, see TraceLogger Members .

System.Object
AbstractLogger
AbstractSimpleLogger
TraceLogger

[Visual Basic]
<Serializable> _
Public Class TraceLogger
Inherits AbstractSimpleLogger
Implements IDeserializationCallback
[C#]
[Serializable]
public class TraceLogger : AbstractSimpleLogger, IDeserializationCallback

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Beware not to use CommonLoggingTraceListener in combination with this logger as this would result in an endless loop for obvious reasons!

Requirements

Namespace: Common.Logging.Simple

Assembly: Common.Logging (in Common.Logging.dll)

See Also

TraceLogger Members | Common.Logging.Simple Namespace | Adapter | ConfigurationSectionHandler


TraceLogger Members

TraceLogger overview

Public Instance Constructors

TraceLogger Constructor Creates a new TraceLogger instance.

Public Instance Properties

CurrentLogLevel (inherited from AbstractSimpleLogger) | The current logging threshold. Messages recieved that are beneath this threshold will not be logged.
DateTimeFormat (inherited from AbstractSimpleLogger) | The date and time format to use in the log message.
HasDateTimeFormat (inherited from AbstractSimpleLogger) | Determines Whether DateTimeFormat is set.
IsDebugEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Debug. If it is, all messages will be sent to Out.
IsErrorEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Error. If it is, only messages with a LogLevel of Error and Fatal will be sent to Out.
IsFatalEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Fatal. If it is, only messages with a LogLevel of Fatal will be sent to Out.
IsInfoEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Info. If it is, only messages with a LogLevel of Info, Warn, Error, and Fatal will be sent to Out.
IsTraceEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Trace. If it is, all messages will be sent to Out.
IsWarnEnabled (inherited from AbstractSimpleLogger) | Returns true if the current LogLevel is greater than or equal to Warn. If it is, only messages with a LogLevel of Warn, Error, and Fatal will be sent to Out.
Name (inherited from AbstractSimpleLogger) | The name of the logger.
ShowDateTime (inherited from AbstractSimpleLogger) | Include the current time in the log message.
ShowLevel (inherited from AbstractSimpleLogger) | Include the current log level in the log message.
ShowLogName (inherited from AbstractSimpleLogger) | Include the instance name in the log message.

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
OnDeserialization | Called after deserialization completed.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Methods

Finalize (inherited from Object) |
FormatOutput (inherited from AbstractSimpleLogger) | Appends the formatted message to the specified StringBuilder.
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
IsLevelEnabled | Determines if the given log level is currently enabled. checks Switch if UseTraceSource is true.
MemberwiseClone (inherited from Object) |
WriteInternal | Do the actual logging.

See Also

TraceLogger Class | Common.Logging.Simple Namespace | Adapter | ConfigurationSectionHandler


TraceLogger Constructor

Creates a new TraceLogger instance.

[Visual Basic]
Public Sub New( _
ByVal useTraceSource As Boolean, _
ByVal logName As String, _
ByVal logLevel As LogLevel, _
ByVal showLevel As Boolean, _
ByVal showDateTime As Boolean, _
ByVal showLogName As Boolean, _
ByVal dateTimeFormat As String _
)
[C#]
TraceLogger(
bool useTraceSource,
string logName,
LogLevel logLevel,
bool showLevel,
bool showDateTime,
bool showLogName,
string dateTimeFormat
);

Parameters

useTraceSource
whether to use TraceSource or Trace for logging.
logName
the name of this logger
logLevel
the default log level to use
showLevel
Include the current log level in the log message.
showDateTime
Include the current time in the log message.
showLogName
Include the instance name in the log message.
dateTimeFormat
The date and time format to use in the log message.

See Also

TraceLogger Class | Common.Logging.Simple Namespace


TraceLogger Methods

The methods of the TraceLogger class are listed below. For a complete list of TraceLogger class members, see the TraceLogger Members topic.

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
OnDeserialization | Called after deserialization completed.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Methods

Finalize (inherited from Object) |
FormatOutput (inherited from AbstractSimpleLogger) | Appends the formatted message to the specified StringBuilder.
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
IsLevelEnabled | Determines if the given log level is currently enabled. checks Switch if UseTraceSource is true.
MemberwiseClone (inherited from Object) |
WriteInternal | Do the actual logging.

See Also

TraceLogger Class | Common.Logging.Simple Namespace | Adapter | ConfigurationSectionHandler


TraceLogger.IsLevelEnabled Method

Determines if the given log level is currently enabled. checks Switch if UseTraceSource is true.

[Visual Basic]
Protected Overrides Sub IsLevelEnabled( _
ByVal level As LogLevel _
)
[C#]
protected override bool IsLevelEnabled(
LogLevel level
);

See Also

TraceLogger Class | Common.Logging.Simple Namespace


TraceLogger.OnDeserialization Method

Called after deserialization completed.

[Visual Basic]
Public Overridable Sub OnDeserialization( _
ByVal sender As Object _
) _
Implements IDeserializationCallback.OnDeserialization
[C#]
public virtual void OnDeserialization(
object sender
);

Implements

IDeserializationCallback.OnDeserialization

See Also

TraceLogger Class | Common.Logging.Simple Namespace


TraceLogger.WriteInternal Method

Do the actual logging.

[Visual Basic]
Protected Overrides Sub WriteInternal( _
ByVal level As LogLevel, _
ByVal message As Object, _
ByVal e As Exception _
)
[C#]
protected override void WriteInternal(
LogLevel level,
object message,
Exception e
);

Parameters

level
message
e

See Also

TraceLogger Class | Common.Logging.Simple Namespace


TraceLoggerFactoryAdapter Class

Factory for creating ILog instances that send everything to the Trace output stream.

For a list of all members of this type, see TraceLoggerFactoryAdapter Members .

System.Object
AbstractCachingLoggerFactoryAdapter
AbstractSimpleLoggerFactoryAdapter
TraceLoggerFactoryAdapter

[Visual Basic]
Public Class TraceLoggerFactoryAdapter
Inherits AbstractSimpleLoggerFactoryAdapter
[C#]
public class TraceLoggerFactoryAdapter : AbstractSimpleLoggerFactoryAdapter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Beware not to use CommonLoggingTraceListener in combination with this logger factory as this would result in an endless loop for obvious reasons!

Requirements

Namespace: Common.Logging.Simple

Assembly: Common.Logging (in Common.Logging.dll)

See Also

TraceLoggerFactoryAdapter Members | Common.Logging.Simple Namespace | AbstractSimpleLoggerFactoryAdapter | Adapter | ConfigurationSectionHandler


TraceLoggerFactoryAdapter Members

TraceLoggerFactoryAdapter overview

Public Instance Constructors

TraceLoggerFactoryAdapter Overloaded. Initializes a new instance of the TraceLoggerFactoryAdapter class.

Public Instance Properties

DateTimeFormat (inherited from AbstractSimpleLoggerFactoryAdapter) | The default setting to use when creating new ILog instances.
Level (inherited from AbstractSimpleLoggerFactoryAdapter) | The default LogLevel to use when creating new ILog instances.
ShowDateTime (inherited from AbstractSimpleLoggerFactoryAdapter) | The default setting to use when creating new ILog instances.
ShowLevel (inherited from AbstractSimpleLoggerFactoryAdapter) | The default setting to use when creating new ILog instances.
ShowLogName (inherited from AbstractSimpleLoggerFactoryAdapter) | The default setting to use when creating new ILog instances.
UseTraceSource | Whether to use Trace.TraceXXXX(string,object[]) methods for logging or TraceSource.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Overloaded. Creates a new TraceLogger instance.
CreateLogger (inherited from AbstractSimpleLoggerFactoryAdapter) | Overloaded. Create the specified logger instance
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

TraceLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | AbstractSimpleLoggerFactoryAdapter | Adapter | ConfigurationSectionHandler


TraceLoggerFactoryAdapter Constructor

Initializes a new instance of the TraceLoggerFactoryAdapter class using default settings.

Overload List

Initializes a new instance of the TraceLoggerFactoryAdapter class using default settings.

public TraceLoggerFactoryAdapter()

Initializes a new instance of the TraceLoggerFactoryAdapter class.

public TraceLoggerFactoryAdapter(NameValueCollection)

See Also

TraceLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


TraceLoggerFactoryAdapter Constructor

Initializes a new instance of the TraceLoggerFactoryAdapter class using default settings.

[Visual Basic]
Public Overloads Sub New()
[C#]
TraceLoggerFactoryAdapter();

See Also

TraceLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | TraceLoggerFactoryAdapter Constructor Overload List


TraceLoggerFactoryAdapter Constructor

Initializes a new instance of the TraceLoggerFactoryAdapter class.

[Visual Basic]
Public Overloads Sub New( _
ByVal properties As NameValueCollection _
)
[C#]
TraceLoggerFactoryAdapter(
NameValueCollection properties
);

Parameters

properties
The name value collection, typically specified by the user in a configuration section named common/logging.

Remarks

Looks for level, showDateTime, showLogName, dateTimeFormat items from properties for use when the GetLogger methods are called. ConfigurationSectionHandler for more information on how to use the standard .NET application configuraiton file (App.config/Web.config) to configure this adapter.

See Also

TraceLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | TraceLoggerFactoryAdapter Constructor Overload List


TraceLoggerFactoryAdapter Properties

The properties of the TraceLoggerFactoryAdapter class are listed below. For a complete list of TraceLoggerFactoryAdapter class members, see the TraceLoggerFactoryAdapter Members topic.

Public Instance Properties

DateTimeFormat (inherited from AbstractSimpleLoggerFactoryAdapter) | The default setting to use when creating new ILog instances.
Level (inherited from AbstractSimpleLoggerFactoryAdapter) | The default LogLevel to use when creating new ILog instances.
ShowDateTime (inherited from AbstractSimpleLoggerFactoryAdapter) | The default setting to use when creating new ILog instances.
ShowLevel (inherited from AbstractSimpleLoggerFactoryAdapter) | The default setting to use when creating new ILog instances.
ShowLogName (inherited from AbstractSimpleLoggerFactoryAdapter) | The default setting to use when creating new ILog instances.
UseTraceSource | Whether to use Trace.TraceXXXX(string,object[]) methods for logging or TraceSource.

See Also

TraceLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | AbstractSimpleLoggerFactoryAdapter | Adapter | ConfigurationSectionHandler


UseTraceSource Property

Common Logging 2.0 API Reference

TraceLoggerFactoryAdapter.UseTraceSource Property

Whether to use Trace.TraceXXXX(string,object[]) methods for logging or TraceSource.

[Visual Basic]
Public Property UseTraceSource() As Boolean
Public Get
End Get
Public Set
End Set
End Property
[C#]
public bool UseTraceSource { public get; public set; }

See Also

TraceLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


TraceLoggerFactoryAdapter Methods

The methods of the TraceLoggerFactoryAdapter class are listed below. For a complete list of TraceLoggerFactoryAdapter class members, see the TraceLoggerFactoryAdapter Members topic.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Overloaded. Creates a new TraceLogger instance.
CreateLogger (inherited from AbstractSimpleLoggerFactoryAdapter) | Overloaded. Create the specified logger instance
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

TraceLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | AbstractSimpleLoggerFactoryAdapter | Adapter | ConfigurationSectionHandler


CreateLogger Method

Common Logging 2.0 API Reference

TraceLoggerFactoryAdapter.CreateLogger Method

Creates a new TraceLogger instance.

Overload List

Inherited from AbstractSimpleLoggerFactoryAdapter.

protected override ILog CreateLogger(string)

Creates a new TraceLogger instance.

protected override ILog CreateLogger(string,LogLevel,bool,bool,bool,string)

See Also

TraceLoggerFactoryAdapter Class | Common.Logging.Simple Namespace


TraceLoggerFactoryAdapter.CreateLogger(String, LogLevel, Boolean, Boolean, Boolean, String) Method

Creates a new TraceLogger instance.

[Visual Basic]
Protected Overrides Overloads Sub CreateLogger( _
ByVal name As String, _
ByVal level As LogLevel, _
ByVal showLevel As Boolean, _
ByVal showDateTime As Boolean, _
ByVal showLogName As Boolean, _
ByVal dateTimeFormat As String _
)
[C#]
protected override ILog CreateLogger(
string name,
LogLevel level,
bool showLevel,
bool showDateTime,
bool showLogName,
string dateTimeFormat
);

See Also

TraceLoggerFactoryAdapter Class | Common.Logging.Simple Namespace | TraceLoggerFactoryAdapter.CreateLogger Overload List


Common.Logging.EntLib

Common Logging 2.0 API Reference

Common.Logging.EntLib Assembly

This assembly contains the adapter to plug Microsoft Enterprise Logging Library 3.1. into the Common.Logging infrastructure.

For an example on how to configure

  • Common.Logging to render its output to Entlib, see EntLibLoggerFactoryAdapter.
  • Entlib to render its output to Common.Logging use CommonLoggingEntlibTraceListener.

Referenced Assemblies

Assembly Reference | Description
Common.Logging | This assembly contains the core functionality of the Common.Logging framework. In particular, checkout LogManager and ILog for usage information.
Microsoft.Practices.EnterpriseLibrary.Common |
Microsoft.Practices.EnterpriseLibrary.Logging |
Microsoft.Practices.ObjectBuilder |
mscorlib |
System |
System.Configuration |

Namespaces

Namespace Description
Common.Logging.EntLib

This namespace contains the implementations to plug EntLib 3.1 into Common.Logging.

For an example on how to configure

  • Common.Logging to render its output to Entlib, see EntLibLoggerFactoryAdapter.
  • Entlib to render its output to Common.Logging use CommonLoggingEntlibTraceListener.

Classes

Class | Description
CommonLoggingEntlibTraceListener | Use this TraceListener implementation to route all Entlib logging events to the Common.Logging infrastructure.
CommonLoggingEntlibTraceListenerAssembler | This type supports the Enterprise Library infrastructure and is not intended to be used directly from your code. Represents the process to build a CommonLoggingEntlibTraceListener described by a CommonLoggingEntlibTraceListenerData configuration object.
CommonLoggingEntlibTraceListenerData | Represents the configuration settings that describe a CommonLoggingEntlibTraceListener.
EntLibLogger | Concrete implementation of ILog interface specific to Enterprise Logging 3.1.
EntLibLoggerFactoryAdapter | Adapts the EnterpriseLibrary 3.1 logging system to Common.Logging.
EntLibLoggerSettings | Holds configuration settings for EntLibLoggers.
SeverityFilter | Filters LogEntrys by severity (see TraceEventType).

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


Common.Logging.EntLib

Common Logging 2.0 API Reference

Common.Logging.EntLib Namespace

This namespace contains the implementations to plug EntLib 3.1 into Common.Logging.

For an example on how to configure

  • Common.Logging to render its output to Entlib, see EntLibLoggerFactoryAdapter.
  • Entlib to render its output to Common.Logging use CommonLoggingEntlibTraceListener.

Namespace Hierarchy

Classes

Class | Description
CommonLoggingEntlibTraceListener | Use this TraceListener implementation to route all Entlib logging events to the Common.Logging infrastructure.
CommonLoggingEntlibTraceListenerAssembler | This type supports the Enterprise Library infrastructure and is not intended to be used directly from your code. Represents the process to build a CommonLoggingEntlibTraceListener described by a CommonLoggingEntlibTraceListenerData configuration object.
CommonLoggingEntlibTraceListenerData | Represents the configuration settings that describe a CommonLoggingEntlibTraceListener.
EntLibLogger | Concrete implementation of ILog interface specific to Enterprise Logging 3.1.
EntLibLoggerFactoryAdapter | Adapts the EnterpriseLibrary 3.1 logging system to Common.Logging.
EntLibLoggerSettings | Holds configuration settings for EntLibLoggers.
SeverityFilter | Filters LogEntrys by severity (see TraceEventType).


CommonLoggingEntlibTraceListener Class

Use this TraceListener implementation to route all Entlib logging events to the Common.Logging infrastructure.

For a list of all members of this type, see CommonLoggingEntlibTraceListener Members .

System.Object
MarshalByRefObject
TraceListener
FormattedTraceListenerBase
CommonLoggingEntlibTraceListener

[Visual Basic]
Public Class CommonLoggingEntlibTraceListener
Inherits FormattedTraceListenerBase
[C#]
public class CommonLoggingEntlibTraceListener : FormattedTraceListenerBase

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

See CommonLoggingEntlibTraceListenerData for a list of properties to configure.

Example

To route all Logger events to Common.Logging, configure CommonLoggingEntlibTraceListener:

[XML]
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <configSections>
        <section name="loggingConfiguration"
type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
    </configSections>
    <loggingConfiguration name="Logging Application Block" tracingEnabled="true"
        defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
        <listeners>
            <add name="Common.Logging Listener"
                 type="Common.Logging.EntLib.CommonLoggingEntlibTraceListener, Common.Logging.EntLib"
                 listenerDataType="Common.Logging.EntLib.CommonLoggingEntlibTraceListenerData,
Common.Logging.EntLib"
                 loggerNameFormat="{listenerName}.{sourceName}"
                 formatter="Text Formatter"
                 />
        </listeners>
        <formatters>
            <add template="Timestamp: {timestamp}&#xD;&#xA;Message: {message}&#xD;&#xA;Category:
{category}&#xD;&#xA;Priority: {priority}&#xD;&#xA;EventId: {eventid}&#xD;&#xA;Severity:
{severity}&#xD;&#xA;Title:{title}&#xD;&#xA;Machine: {machine}&#xD;&#xA;Application Domain:
{appDomain}&#xD;&#xA;Process Id: {processId}&#xD;&#xA;Process Name: {processName}&#xD;&#xA;Win32
Thread Id: {win32ThreadId}&#xD;&#xA;Thread Name: {threadName}&#xD;&#xA;Extended Properties:
{dictionary({key} - {value}&#xD;&#xA;)}"
                type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
                name="Text Formatter" />
        </formatters>
        <specialSources>
            <allEvents switchValue="All" name="All Events">
                <listeners>
                    <add name="Test Capturing Listener" />
                </listeners>
            </allEvents>
        </specialSources>
    </loggingConfiguration>
</configuration>

Requirements

Namespace: Common.Logging.EntLib

Assembly: Common.Logging.EntLib (in Common.Logging.EntLib.dll)

See Also

CommonLoggingEntlibTraceListener Members | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener Members

CommonLoggingEntlibTraceListener overview

Public Instance Constructors

CommonLoggingEntlibTraceListener Constructor Initializes this instance from CommonLoggingEntlibTraceListenerData configuration information.

Public Instance Properties

Attributes (inherited from TraceListener) |
Filter (inherited from TraceListener) |
Formatter (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase) |
IndentLevel (inherited from TraceListener) |
IndentSize (inherited from TraceListener) |
IsThreadSafe (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase) |
LoggerNameFormat | Format to use for creating the logger name. Defaults to "{listenerName}.{sourceName}".
Name (inherited from TraceListener) |
TraceOutputOptions (inherited from TraceListener) |

Public Instance Methods

Close (inherited from TraceListener) |
CreateObjRef (inherited from MarshalByRefObject) |
Dispose (inherited from TraceListener) | Overloaded.
Equals (inherited from Object) |
Fail (inherited from TraceListener) | Overloaded.
Flush (inherited from TraceListener) |
GetHashCode (inherited from Object) |
GetInstrumentationEventProvider (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase) |
GetLifetimeService (inherited from MarshalByRefObject) |
GetType (inherited from Object) |
InitializeLifetimeService (inherited from MarshalByRefObject) |
ToString (inherited from Object) |
TraceData | Overloaded. Overridden to redirect to call Log.
TraceData (inherited from TraceListener) | Overloaded.
TraceEvent (inherited from TraceListener) | Overloaded.
TraceTransfer (inherited from TraceListener) |
Write | Overloaded. NOT USED BY ENTLIB
Write (inherited from TraceListener) | Overloaded.
WriteLine | Overloaded. NOT USED BY ENTLIB
WriteLine (inherited from TraceListener) | Overloaded.

Protected Instance Properties

InstrumentationProvider (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase)
NeedIndent (inherited from TraceListener)

Protected Instance Methods

Dispose (inherited from TraceListener) | Overloaded.
Finalize (inherited from Object) |
GetSupportedAttributes (inherited from TraceListener) |
Log | Logs the given message to the Common.Logging infrastructure
MemberwiseClone (inherited from MarshalByRefObject) | Overloaded.
MemberwiseClone (inherited from Object) | Overloaded.
WriteIndent (inherited from TraceListener) |

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener Constructor

Initializes this instance from CommonLoggingEntlibTraceListenerData configuration information.

[Visual Basic]
Public Sub New( _
ByVal data As CommonLoggingEntlibTraceListenerData, _
ByVal formatter As ILogFormatter _
)
[C#]
CommonLoggingEntlibTraceListener(
CommonLoggingEntlibTraceListenerData data,
ILogFormatter formatter
);

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener Properties

The properties of the CommonLoggingEntlibTraceListener class are listed below. For a complete list of CommonLoggingEntlibTraceListener class members, see the CommonLoggingEntlibTraceListener Members topic.

Public Instance Properties

Attributes (inherited from TraceListener) |
Filter (inherited from TraceListener) |
Formatter (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase) |
IndentLevel (inherited from TraceListener) |
IndentSize (inherited from TraceListener) |
IsThreadSafe (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase) |
LoggerNameFormat | Format to use for creating the logger name. Defaults to "{listenerName}.{sourceName}".
Name (inherited from TraceListener) |
TraceOutputOptions (inherited from TraceListener) |

Protected Instance Properties

InstrumentationProvider (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase)
NeedIndent (inherited from TraceListener)

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


LoggerNameFormat Property

Common Logging 2.0 API Reference

CommonLoggingEntlibTraceListener.LoggerNameFormat Property

Format to use for creating the logger name. Defaults to "{listenerName}.{sourceName}".

[Visual Basic]
Public ReadOnly Property LoggerNameFormat() As String
Public Get
End Get
End Property
[C#]
public string LoggerNameFormat { public get; }

Remarks

Available placeholders are:

  • {listenerName}: the configured name of this listener instance.
  • {sourceName}: the trace source name an event originates from (see e.g. TraceEvent.

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener Methods

The methods of the CommonLoggingEntlibTraceListener class are listed below. For a complete list of CommonLoggingEntlibTraceListener class members, see the CommonLoggingEntlibTraceListener Members topic.

Public Instance Methods

Close (inherited from TraceListener) |
CreateObjRef (inherited from MarshalByRefObject) |
Dispose (inherited from TraceListener) | Overloaded.
Equals (inherited from Object) |
Fail (inherited from TraceListener) | Overloaded.
Flush (inherited from TraceListener) |
GetHashCode (inherited from Object) |
GetInstrumentationEventProvider (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase) |
GetLifetimeService (inherited from MarshalByRefObject) |
GetType (inherited from Object) |
InitializeLifetimeService (inherited from MarshalByRefObject) |
ToString (inherited from Object) |
TraceData | Overloaded. Overridden to redirect to call Log.
TraceData (inherited from TraceListener) | Overloaded.
TraceEvent (inherited from TraceListener) | Overloaded.
TraceTransfer (inherited from TraceListener) |
Write | Overloaded. NOT USED BY ENTLIB
Write (inherited from TraceListener) | Overloaded.
WriteLine | Overloaded. NOT USED BY ENTLIB
WriteLine (inherited from TraceListener) | Overloaded.

Protected Instance Methods

Dispose (inherited from TraceListener) | Overloaded.
Finalize (inherited from Object) |
GetSupportedAttributes (inherited from TraceListener) |
Log | Logs the given message to the Common.Logging infrastructure
MemberwiseClone (inherited from MarshalByRefObject) | Overloaded.
MemberwiseClone (inherited from Object) | Overloaded.
WriteIndent (inherited from TraceListener) |

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener.Log Method

Logs the given message to the Common.Logging infrastructure

[Visual Basic]
Protected Overridable Sub Log( _
ByVal eventType As TraceEventType, _
ByVal source As String, _
ByVal id As Integer, _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
protected virtual void Log(
TraceEventType eventType,
string source,
int id,
string format,
params object[] args
);

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


TraceData Method

Common Logging 2.0 API Reference

CommonLoggingEntlibTraceListener.TraceData Method

Overridden to redirect to call Log.

Overload List

Overridden to redirect to call Log.

public override void TraceData(TraceEventCache,string,TraceEventType,int,object)

Inherited from TraceListener.

public virtual void TraceData(TraceEventCache,string,TraceEventType,int,params object[])

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener.TraceData(TraceEventCache, String, TraceEventType, Int32, Object) Method

Overridden to redirect to call Log.

[Visual Basic]
Public Overrides Overloads Sub TraceData( _
ByVal eventCache As TraceEventCache, _
ByVal source As String, _
ByVal eventType As TraceEventType, _
ByVal id As Integer, _
ByVal data As Object _
)
[C#]
public override void TraceData(
TraceEventCache eventCache,
string source,
TraceEventType eventType,
int id,
object data
);

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace | CommonLoggingEntlibTraceListener.TraceData Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


Write Method

Common Logging 2.0 API Reference

CommonLoggingEntlibTraceListener.Write Method

NOT USED BY ENTLIB

Overload List

Inherited from TraceListener.

public virtual void Write(object)

Inherited from TraceListener.

public virtual void Write(object,string)

NOT USED BY ENTLIB

public override void Write(string)

Inherited from TraceListener.

public virtual void Write(string,string)

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener.Write(String) Method

NOT USED BY ENTLIB

[Visual Basic]
Public Overrides Overloads Sub Write( _
ByVal message As String _
)
[C#]
public override void Write(
string message
);

Exceptions

Exception Type | Condition
NotImplementedException |

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace | CommonLoggingEntlibTraceListener.Write Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


WriteLine Method

Common Logging 2.0 API Reference

CommonLoggingEntlibTraceListener.WriteLine Method

NOT USED BY ENTLIB

Overload List

Inherited from TraceListener.

public virtual void WriteLine(object)

Inherited from TraceListener.

public virtual void WriteLine(object,string)

NOT USED BY ENTLIB

public override void WriteLine(string)

Inherited from TraceListener.

public virtual void WriteLine(string,string)

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener.WriteLine(String) Method

NOT USED BY ENTLIB

[Visual Basic]
Public Overrides Overloads Sub WriteLine( _
ByVal message As String _
)
[C#]
public override void WriteLine(
string message
);

Exceptions

Exception Type | Condition
NotImplementedException |

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace | CommonLoggingEntlibTraceListener.WriteLine Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerAssembler Class

This type supports the Enterprise Library infrastructure and is not intended to be used directly from your code. Represents the process to build a CommonLoggingEntlibTraceListener described by a CommonLoggingEntlibTraceListenerData configuration object.

For a list of all members of this type, see CommonLoggingEntlibTraceListenerAssembler Members .

System.Object
TraceListenerAsssembler
CommonLoggingEntlibTraceListenerAssembler

[Visual Basic]
Public Class CommonLoggingEntlibTraceListenerAssembler
Inherits TraceListenerAsssembler
[C#]
public class CommonLoggingEntlibTraceListenerAssembler : TraceListenerAsssembler

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.EntLib

Assembly: Common.Logging.EntLib (in Common.Logging.EntLib.dll)

See Also

CommonLoggingEntlibTraceListenerAssembler Members | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerAssembler Members

CommonLoggingEntlibTraceListenerAssembler overview

Public Instance Constructors

CommonLoggingEntlibTraceListenerAssembler Constructor Initializes a new instance of the CommonLoggingEntlibTraceListenerAssembler class.

Public Instance Methods

Assemble | This method supports the Enterprise Library infrastructure and is not intended to be used directly from your code. Builds a CommonLoggingEntlibTraceListener described by a CommonLoggingEntlibTraceListenerData configuration object.
Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
GetFormatter (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerAsssembler)
MemberwiseClone (inherited from Object)

See Also

CommonLoggingEntlibTraceListenerAssembler Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerAssembler Constructor

Initializes a new instance of the CommonLoggingEntlibTraceListenerAssembler class.

[Visual Basic]
Public Sub New()
[C#]
CommonLoggingEntlibTraceListenerAssembler();

See Also

CommonLoggingEntlibTraceListenerAssembler Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerAssembler Methods

The methods of the CommonLoggingEntlibTraceListenerAssembler class are listed below. For a complete list of CommonLoggingEntlibTraceListenerAssembler class members, see the CommonLoggingEntlibTraceListenerAssembler Members topic.

Public Instance Methods

Assemble | This method supports the Enterprise Library infrastructure and is not intended to be used directly from your code. Builds a CommonLoggingEntlibTraceListener described by a CommonLoggingEntlibTraceListenerData configuration object.
Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
GetFormatter (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerAsssembler)
MemberwiseClone (inherited from Object)

See Also

CommonLoggingEntlibTraceListenerAssembler Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerAssembler.Assemble Method

This method supports the Enterprise Library infrastructure and is not intended to be used directly from your code. Builds a CommonLoggingEntlibTraceListener described by a CommonLoggingEntlibTraceListenerData configuration object.

[Visual Basic]
Public Overrides Sub Assemble( _
ByVal context As IBuilderContext, _
ByVal objectConfiguration As TraceListenerData, _
ByVal configurationSource As IConfigurationSource, _
ByVal reflectionCache As ConfigurationReflectionCache _
) _
Implements IAssembler(TraceListener,TraceListenerData).Assemble
[C#]
public override TraceListener Assemble(
IBuilderContext context,
TraceListenerData objectConfiguration,
IConfigurationSource configurationSource,
ConfigurationReflectionCache reflectionCache
);

Implements

IAssembler(TraceListener,TraceListenerData).Assemble

See Also

CommonLoggingEntlibTraceListenerAssembler Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerData Class

Represents the configuration settings that describe a CommonLoggingEntlibTraceListener.

For a list of all members of this type, see CommonLoggingEntlibTraceListenerData Members .

System.Object
ConfigurationElement
NamedConfigurationElement
NameTypeConfigurationElement
TraceListenerData
CommonLoggingEntlibTraceListenerData

[Visual Basic]
<Assembler(AssemblerType:=Common.Logging.EntLib.CommonLoggingEntlibTraceListenerAssembler)> _
<DefaultMember(MemberName:="Item")> _
Public Class CommonLoggingEntlibTraceListenerData
Inherits TraceListenerData
[C#]
[Assembler(AssemblerType=Common.Logging.EntLib.CommonLoggingEntlibTraceListenerAssembler)]
[DefaultMember(MemberName="Item")]
public class CommonLoggingEntlibTraceListenerData : TraceListenerData

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.EntLib

Assembly: Common.Logging.EntLib (in Common.Logging.EntLib.dll)

See Also

CommonLoggingEntlibTraceListenerData Members | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerData Members

CommonLoggingEntlibTraceListenerData overview

Public Instance Constructors

CommonLoggingEntlibTraceListenerData Constructor Initializes a new instance of the CommonLoggingEntlibTraceListenerData class.

Public Instance Properties

ElementInformation (inherited from ConfigurationElement) |
Formatter | Gets or Sets the formatter name
ListenerDataType (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerData) |
ListenerDataTypeName (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerData) |
LockAllAttributesExcept (inherited from ConfigurationElement) |
LockAllElementsExcept (inherited from ConfigurationElement) |
LockAttributes (inherited from ConfigurationElement) |
LockElements (inherited from ConfigurationElement) |
LockItem (inherited from ConfigurationElement) |
LoggerNameFormat | The logger name format to use for creating logger names from Name and
Name (inherited from Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NamedConfigurationElement) |
TraceOutputOptions (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerData) |
Type (inherited from Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NameTypeConfigurationElement) |
TypeName (inherited from Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NameTypeConfigurationElement) |

Public Instance Methods

DeserializeElement (inherited from Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NamedConfigurationElement) | Overloaded.
Equals (inherited from ConfigurationElement) |
GetHashCode (inherited from ConfigurationElement) |
GetType (inherited from Object) |
IsReadOnly (inherited from ConfigurationElement) |
ToString (inherited from Object) |

Protected Instance Properties

ElementProperty (inherited from ConfigurationElement)
EvaluationContext (inherited from ConfigurationElement)
Item (inherited from ConfigurationElement)
Item (inherited from ConfigurationElement)

Protected Instance Methods

DeserializeElement (inherited from ConfigurationElement) | Overloaded.
Finalize (inherited from Object) |
Init (inherited from ConfigurationElement) |
InitializeDefault (inherited from ConfigurationElement) |
IsModified (inherited from ConfigurationElement) |
ListErrors (inherited from ConfigurationElement) |
MemberwiseClone (inherited from Object) |
OnDeserializeUnrecognizedAttribute (inherited from ConfigurationElement) |
OnDeserializeUnrecognizedElement (inherited from ConfigurationElement) |
OnRequiredPropertyNotFound (inherited from ConfigurationElement) |
PostDeserialize (inherited from ConfigurationElement) |
PreSerialize (inherited from ConfigurationElement) |
Reset (inherited from ConfigurationElement) |
ResetModified (inherited from ConfigurationElement) |
SerializeElement (inherited from ConfigurationElement) |
SerializeToXmlElement (inherited from ConfigurationElement) |
SetPropertyValue (inherited from ConfigurationElement) |
SetReadOnly (inherited from ConfigurationElement) |
Unmerge (inherited from ConfigurationElement) |

See Also

CommonLoggingEntlibTraceListenerData Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerData Constructor

Initializes a new instance of the CommonLoggingEntlibTraceListenerData class.

[Visual Basic]
Public Sub New()
[C#]
CommonLoggingEntlibTraceListenerData();

See Also

CommonLoggingEntlibTraceListenerData Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerData Properties

The properties of the CommonLoggingEntlibTraceListenerData class are listed below. For a complete list of CommonLoggingEntlibTraceListenerData class members, see the CommonLoggingEntlibTraceListenerData Members topic.

Public Instance Properties

ElementInformation (inherited from ConfigurationElement) |
Formatter | Gets or Sets the formatter name
ListenerDataType (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerData) |
ListenerDataTypeName (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerData) |
LockAllAttributesExcept (inherited from ConfigurationElement) |
LockAllElementsExcept (inherited from ConfigurationElement) |
LockAttributes (inherited from ConfigurationElement) |
LockElements (inherited from ConfigurationElement) |
LockItem (inherited from ConfigurationElement) |
LoggerNameFormat | The logger name format to use for creating logger names from Name and
Name (inherited from Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NamedConfigurationElement) |
TraceOutputOptions (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerData) |
Type (inherited from Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NameTypeConfigurationElement) |
TypeName (inherited from Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NameTypeConfigurationElement) |

Protected Instance Properties

ElementProperty (inherited from ConfigurationElement)
EvaluationContext (inherited from ConfigurationElement)
Item (inherited from ConfigurationElement)
Item (inherited from ConfigurationElement)

See Also

CommonLoggingEntlibTraceListenerData Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


Formatter Property

Common Logging 2.0 API Reference

CommonLoggingEntlibTraceListenerData.Formatter Property

Gets or Sets the formatter name

[Visual Basic]
<ConfigurationProperty(IsRequired:=False, Name:="formatter", DefaultValue:=System.Object, Options:=ConfigurationPropertyOptions.None, IsDefaultCollection:=False, IsKey:=False)> _
Public Property Formatter() As String
Public Get
End Get
Public Set
End Set
End Property
[C#]
[ConfigurationProperty(IsRequired=False, Name="formatter", DefaultValue=System.Object, Options=ConfigurationPropertyOptions.None, IsDefaultCollection=False, IsKey=False)]
public string Formatter { public get; public set; }

See Also

CommonLoggingEntlibTraceListenerData Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


LoggerNameFormat Property

Common Logging 2.0 API Reference

CommonLoggingEntlibTraceListenerData.LoggerNameFormat Property

The logger name format to use for creating logger names from Name and

[Visual Basic]
<ConfigurationProperty(Name:="loggerNameFormat", DefaultValue:=System.Object, Options:=ConfigurationPropertyOptions.None, IsDefaultCollection:=False, IsRequired:=False, IsKey:=False)> _
Public Property LoggerNameFormat() As String
Public Get
End Get
Public Set
End Set
End Property
[C#]
[ConfigurationProperty(Name="loggerNameFormat", DefaultValue=System.Object, Options=ConfigurationPropertyOptions.None, IsDefaultCollection=False, IsRequired=False, IsKey=False)]
public string LoggerNameFormat { public get; public set; }

See Also

CommonLoggingEntlibTraceListenerData Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLogger Class

Concrete implementation of ILog interface specific to Enterprise Logging 3.1.

For a list of all members of this type, see EntLibLogger Members .

System.Object
AbstractLogger
EntLibLogger

[Visual Basic]
Public Class EntLibLogger
Inherits AbstractLogger
[C#]
public class EntLibLogger : AbstractLogger

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Instances are created by the EntLibLoggerFactoryAdapter. DefaultPriority is used for logging a LogEntry to Write. The category name used is the name passed into GetLogger. For configuring logging, see EntLibLoggerFactoryAdapter.

Requirements

Namespace: Common.Logging.EntLib

Assembly: Common.Logging.EntLib (in Common.Logging.EntLib.dll)

See Also

EntLibLogger Members | Common.Logging.EntLib Namespace | ILog | EntLibLoggerFactoryAdapter

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLogger Members

EntLibLogger overview

Public Instance Constructors

EntLibLogger Constructor Initializes a new instance of the EntLibLogger class.

Public Instance Properties

Category | The category of this logger
IsDebugEnabled | Gets a value indicating whether this instance is debug enabled.
IsErrorEnabled | Gets a value indicating whether this instance is error enabled.
IsFatalEnabled | Gets a value indicating whether this instance is fatal enabled.
IsInfoEnabled | Gets a value indicating whether this instance is info enabled.
IsTraceEnabled | Gets a value indicating whether this instance is trace enabled.
IsWarnEnabled | Gets a value indicating whether this instance is warn enabled.
LogWriter | The LogWriter used by this logger.
Settings | The settings used by this logger

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Methods

AddExceptionInfo | Adds the exception info.
CreateLogEntry | Creates a minimal log entry instance that will be passed into ShouldLog to asap decide, whether this event should be logged.
Finalize (inherited from Object) |
GetTraceEventType | Translates a LogLevel to a TraceEventType.
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
MemberwiseClone (inherited from Object) |
PopulateLogEntry | Configures the log entry.
ShouldLog | May be overridden for custom filter logic
WriteInternal | Actually sends the message to the EnterpriseLogging log system.
WriteLog | Write the fully populated event to the log.

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace | ILog | EntLibLoggerFactoryAdapter

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLogger Constructor

Initializes a new instance of the EntLibLogger class.

[Visual Basic]
Public Sub New( _
ByVal category As String, _
ByVal logWriter As LogWriter, _
ByVal settings As EntLibLoggerSettings _
)
[C#]
EntLibLogger(
string category,
LogWriter logWriter,
EntLibLoggerSettings settings
);

Parameters

category
The category.
logWriter
the LogWriter to write log events to.
settings
the logger settings

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLogger Properties

The properties of the EntLibLogger class are listed below. For a complete list of EntLibLogger class members, see the EntLibLogger Members topic.

Public Instance Properties

Category | The category of this logger
IsDebugEnabled | Gets a value indicating whether this instance is debug enabled.
IsErrorEnabled | Gets a value indicating whether this instance is error enabled.
IsFatalEnabled | Gets a value indicating whether this instance is fatal enabled.
IsInfoEnabled | Gets a value indicating whether this instance is info enabled.
IsTraceEnabled | Gets a value indicating whether this instance is trace enabled.
IsWarnEnabled | Gets a value indicating whether this instance is warn enabled.
LogWriter | The LogWriter used by this logger.
Settings | The settings used by this logger

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace | ILog | EntLibLoggerFactoryAdapter

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


Category Property

Common Logging 2.0 API Reference

EntLibLogger.Category Property

The category of this logger

[Visual Basic]
Public ReadOnly Property Category() As String
Public Get
End Get
End Property
[C#]
public string Category { public get; }

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


IsDebugEnabled Property

Common Logging 2.0 API Reference

EntLibLogger.IsDebugEnabled Property

Gets a value indicating whether this instance is debug enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsDebugEnabled() As Boolean _
Implements ILog.IsDebugEnabled

Public Get
End Get
End Property
[C#]
public override bool IsDebugEnabled { public get; }

Implements

ILog.IsDebugEnabled

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


IsErrorEnabled Property

Common Logging 2.0 API Reference

EntLibLogger.IsErrorEnabled Property

Gets a value indicating whether this instance is error enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsErrorEnabled() As Boolean _
Implements ILog.IsErrorEnabled

Public Get
End Get
End Property
[C#]
public override bool IsErrorEnabled { public get; }

Implements

ILog.IsErrorEnabled

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


IsFatalEnabled Property

Common Logging 2.0 API Reference

EntLibLogger.IsFatalEnabled Property

Gets a value indicating whether this instance is fatal enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsFatalEnabled() As Boolean _
Implements ILog.IsFatalEnabled

Public Get
End Get
End Property
[C#]
public override bool IsFatalEnabled { public get; }

Implements

ILog.IsFatalEnabled

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


IsInfoEnabled Property

Common Logging 2.0 API Reference

EntLibLogger.IsInfoEnabled Property

Gets a value indicating whether this instance is info enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsInfoEnabled() As Boolean _
Implements ILog.IsInfoEnabled

Public Get
End Get
End Property
[C#]
public override bool IsInfoEnabled { public get; }

Implements

ILog.IsInfoEnabled

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


IsTraceEnabled Property

Common Logging 2.0 API Reference

EntLibLogger.IsTraceEnabled Property

Gets a value indicating whether this instance is trace enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsTraceEnabled() As Boolean _
Implements ILog.IsTraceEnabled

Public Get
End Get
End Property
[C#]
public override bool IsTraceEnabled { public get; }

Implements

ILog.IsTraceEnabled

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


IsWarnEnabled Property

Common Logging 2.0 API Reference

EntLibLogger.IsWarnEnabled Property

Gets a value indicating whether this instance is warn enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsWarnEnabled() As Boolean _
Implements ILog.IsWarnEnabled

Public Get
End Get
End Property
[C#]
public override bool IsWarnEnabled { public get; }

Implements

ILog.IsWarnEnabled

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


LogWriter Property

Common Logging 2.0 API Reference

EntLibLogger.LogWriter Property

The LogWriter used by this logger.

[Visual Basic]
Public ReadOnly Property LogWriter() As LogWriter
Public Get
End Get
End Property
[C#]
public LogWriter LogWriter { public get; }

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


Settings Property

Common Logging 2.0 API Reference

EntLibLogger.Settings Property

The settings used by this logger

[Visual Basic]
Public ReadOnly Property Settings() As EntLibLoggerSettings
Public Get
End Get
End Property
[C#]
public EntLibLoggerSettings Settings { public get; }

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLogger Methods

The methods of the EntLibLogger class are listed below. For a complete list of EntLibLogger class members, see the EntLibLogger Members topic.

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Methods

AddExceptionInfo | Adds the exception info.
CreateLogEntry | Creates a minimal log entry instance that will be passed into ShouldLog to asap decide, whether this event should be logged.
Finalize (inherited from Object) |
GetTraceEventType | Translates a LogLevel to a TraceEventType.
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
MemberwiseClone (inherited from Object) |
PopulateLogEntry | Configures the log entry.
ShouldLog | May be overridden for custom filter logic
WriteInternal | Actually sends the message to the EnterpriseLogging log system.
WriteLog | Write the fully populated event to the log.

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace | ILog | EntLibLoggerFactoryAdapter

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLogger.AddExceptionInfo Method

Adds the exception info.

[Visual Basic]
Protected Overridable Sub AddExceptionInfo( _
ByVal log As LogEntry, _
ByVal exception As Exception _
)
[C#]
protected virtual void AddExceptionInfo(
LogEntry log,
Exception exception
);

Parameters

log
The log entry.
exception
The exception.

Return Value

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLogger.CreateLogEntry Method

Creates a minimal log entry instance that will be passed into ShouldLog to asap decide, whether this event should be logged.

[Visual Basic]
Protected Overridable Sub CreateLogEntry( _
ByVal traceEventType As TraceEventType _
)
[C#]
protected virtual LogEntry CreateLogEntry(
TraceEventType traceEventType
);

Parameters

traceEventType
trace event severity.

Return Value

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLogger.GetTraceEventType Method

Translates a LogLevel to a TraceEventType.

[Visual Basic]
Protected Overridable Sub GetTraceEventType( _
ByVal logLevel As LogLevel _
)
[C#]
protected virtual TraceEventType GetTraceEventType(
LogLevel logLevel
);

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLogger.PopulateLogEntry Method

Configures the log entry.

[Visual Basic]
Protected Overridable Sub PopulateLogEntry( _
ByVal log As LogEntry, _
ByVal message As Object, _
ByVal ex As Exception _
)
[C#]
protected virtual void PopulateLogEntry(
LogEntry log,
object message,
Exception ex
);

Parameters

log
The log.
message
The message.
ex
The ex.

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLogger.ShouldLog Method

May be overridden for custom filter logic

[Visual Basic]
Protected Overridable Sub ShouldLog( _
ByVal log As LogEntry _
)
[C#]
protected virtual bool ShouldLog(
LogEntry log
);

Parameters

log

Return Value

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLogger.WriteInternal Method

Actually sends the message to the EnterpriseLogging log system.

[Visual Basic]
Protected Overrides Sub WriteInternal( _
ByVal logLevel As LogLevel, _
ByVal message As Object, _
ByVal exception As Exception _
)
[C#]
protected override void WriteInternal(
LogLevel logLevel,
object message,
Exception exception
);

Parameters

logLevel
the level of this log event.
message
the message to log
exception
the exception to log (may be null)

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLogger.WriteLog Method

Write the fully populated event to the log.

[Visual Basic]
Protected Overridable Sub WriteLog( _
ByVal log As LogEntry _
)
[C#]
protected virtual void WriteLog(
LogEntry log
);

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Class

Adapts the EnterpriseLibrary 3.1 logging system to Common.Logging.

For a list of all members of this type, see EntLibLoggerFactoryAdapter Members .

System.Object
AbstractCachingLoggerFactoryAdapter
EntLibLoggerFactoryAdapter

[Visual Basic]
Public Class EntLibLoggerFactoryAdapter
Inherits AbstractCachingLoggerFactoryAdapter
[C#]
public class EntLibLoggerFactoryAdapter : AbstractCachingLoggerFactoryAdapter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The following configuration property values may be configured:

  • DefaultPriority (see DefaultPriority)
  • ExceptionFormat (see ExceptionFormat)

Example

The following snippet shows how to configure EntLib logging for Common.Logging:

<configuration>
  <configSections>
      <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
      <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  </configSections>
  <common>
    <logging>
      <factoryAdapter type="Common.Logging.EntLib.EntLibLoggerFactoryAdapter, Common.Logging.EntLib">
        <arg key="DefaultPriority" value="-1" />
      </factoryAdapter>
    </logging>
  </common>
  <loggingConfiguration name="Logging Application Block"
<-- configure enterprise logging application block here -->
...
  </loggingConfiguration>
</configuration>

Requirements

Namespace: Common.Logging.EntLib

Assembly: Common.Logging.EntLib (in Common.Logging.EntLib.dll)

See Also

EntLibLoggerFactoryAdapter Members | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Members

EntLibLoggerFactoryAdapter overview

Public Instance Constructors

EntLibLoggerFactoryAdapter Overloaded. Initializes a new instance of the EntLibLoggerFactoryAdapter class.

Public Instance Properties

DefaultPriority | The default priority used to log events.
ExceptionFormat | The format string used for formatting exceptions
LogWriter | the _logWriter to write log events to.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Overloaded. Creates a new EntLibLogger instance.
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Constructor

Initializes a new instance of the EntLibLoggerFactoryAdapter class.

Overload List

Initializes a new instance of the EntLibLoggerFactoryAdapter class.

public EntLibLoggerFactoryAdapter()

Initializes a new instance of the EntLibLoggerFactoryAdapter class.

public EntLibLoggerFactoryAdapter(NameValueCollection)

Initializes a new instance of the EntLibLoggerFactoryAdapter class with the specified configuration parameters.

public EntLibLoggerFactoryAdapter(int,string,LogWriter)

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Constructor

Initializes a new instance of the EntLibLoggerFactoryAdapter class.

[Visual Basic]
Public Overloads Sub New()
[C#]
EntLibLoggerFactoryAdapter();

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace | EntLibLoggerFactoryAdapter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Constructor

Initializes a new instance of the EntLibLoggerFactoryAdapter class with the specified configuration parameters.

[Visual Basic]
Public Overloads Sub New( _
ByVal defaultPriority As Integer, _
ByVal exceptionFormat As String, _
ByVal logWriter As LogWriter _
)
[C#]
EntLibLoggerFactoryAdapter(
int defaultPriority,
string exceptionFormat,
LogWriter logWriter
);

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace | EntLibLoggerFactoryAdapter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Constructor

Initializes a new instance of the EntLibLoggerFactoryAdapter class.

[Visual Basic]
Public Overloads Sub New( _
ByVal properties As NameValueCollection _
)
[C#]
EntLibLoggerFactoryAdapter(
NameValueCollection properties
);

Parameters

properties
The properties.

Remarks

passed in values are not used, configuration is external to EntLib logging API

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace | EntLibLoggerFactoryAdapter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Properties

The properties of the EntLibLoggerFactoryAdapter class are listed below. For a complete list of EntLibLoggerFactoryAdapter class members, see the EntLibLoggerFactoryAdapter Members topic.

Public Instance Properties

DefaultPriority | The default priority used to log events.
ExceptionFormat | The format string used for formatting exceptions
LogWriter | the _logWriter to write log events to.

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


DefaultPriority Property

Common Logging 2.0 API Reference

EntLibLoggerFactoryAdapter.DefaultPriority Property

The default priority used to log events.

[Visual Basic]
Public ReadOnly Property DefaultPriority() As Integer
Public Get
End Get
End Property
[C#]
public int DefaultPriority { public get; }

Remarks

defaults to DEFAULTPRIORITY

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


ExceptionFormat Property

Common Logging 2.0 API Reference

EntLibLoggerFactoryAdapter.ExceptionFormat Property

The format string used for formatting exceptions

[Visual Basic]
Public ReadOnly Property ExceptionFormat() As String
Public Get
End Get
End Property
[C#]
public string ExceptionFormat { public get; }

Remarks

defaults to DEFAULTEXCEPTIONFORMAT

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


LogWriter Property

Common Logging 2.0 API Reference

EntLibLoggerFactoryAdapter.LogWriter Property

the _logWriter to write log events to.

[Visual Basic]
Public ReadOnly Property LogWriter() As LogWriter
Public Get
End Get
End Property
[C#]
public LogWriter LogWriter { public get; }

Remarks

defaults to Writer.

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Methods

The methods of the EntLibLoggerFactoryAdapter class are listed below. For a complete list of EntLibLoggerFactoryAdapter class members, see the EntLibLoggerFactoryAdapter Members topic.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Overloaded. Creates a new EntLibLogger instance.
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


CreateLogger Method

Common Logging 2.0 API Reference

EntLibLoggerFactoryAdapter.CreateLogger Method

Creates a new EntLibLogger instance.

Overload List

Creates a new EntLibLogger instance.

protected override ILog CreateLogger(string)

Creates a new EntLibLogger instance.

protected virtual ILog CreateLogger(string,LogWriter,EntLibLoggerSettings)

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter.CreateLogger(String) Method

Creates a new EntLibLogger instance.

[Visual Basic]
Protected Overrides Overloads Sub CreateLogger( _
ByVal name As String _
)
[C#]
protected override ILog CreateLogger(
string name
);

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace | EntLibLoggerFactoryAdapter.CreateLogger Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter.CreateLogger(String, LogWriter, EntLibLoggerSettings) Method

Creates a new EntLibLogger instance.

[Visual Basic]
Protected Overridable Overloads Sub CreateLogger( _
ByVal name As String, _
ByVal logWriter As LogWriter, _
ByVal settings As EntLibLoggerSettings _
)
[C#]
protected virtual ILog CreateLogger(
string name,
LogWriter logWriter,
EntLibLoggerSettings settings
);

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace | EntLibLoggerFactoryAdapter.CreateLogger Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerSettings Class

Holds configuration settings for EntLibLoggers.

For a list of all members of this type, see EntLibLoggerSettings Members .

System.Object
EntLibLoggerSettings

[Visual Basic]
Public Class EntLibLoggerSettings
[C#]
public class EntLibLoggerSettings

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.EntLib

Assembly: Common.Logging.EntLib (in Common.Logging.EntLib.dll)

See Also

EntLibLoggerSettings Members | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerSettings Members

EntLibLoggerSettings overview

Public Static (Shared) Fields

DEFAULTEXCEPTIONFORMAT | the default exceptionFormat used for formatting error message
DEFAULTPRIORITY | the default priority used for logging.

Public Instance Constructors

EntLibLoggerSettings Constructor Initializes a new instance.

Public Instance Fields

exceptionFormat | the exception format to be used.
priority | the default priority to be used.

Public Instance Methods

Equals (inherited from Object)
GetHashCode (inherited from Object)
GetType (inherited from Object)
ToString (inherited from Object)

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

EntLibLoggerSettings Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerSettings Constructor

Initializes a new instance.

[Visual Basic]
Public Sub New( _
ByVal defaultPriority As Integer, _
ByVal exceptionFormat As String _
)
[C#]
EntLibLoggerSettings(
int defaultPriority,
string exceptionFormat
);

See Also

EntLibLoggerSettings Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerSettings Fields

The fields of the EntLibLoggerSettings class are listed below. For a complete list of EntLibLoggerSettings class members, see the EntLibLoggerSettings Members topic.

Public Static (Shared) Fields

DEFAULTEXCEPTIONFORMAT | the default exceptionFormat used for formatting error message
DEFAULTPRIORITY | the default priority used for logging.

Public Instance Fields

exceptionFormat | the exception format to be used.
priority | the default priority to be used.

See Also

EntLibLoggerSettings Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerSettings.DEFAULTEXCEPTIONFORMAT Field

the default exceptionFormat used for formatting error message

[Visual Basic]
Public Shared ReadOnly DEFAULTEXCEPTIONFORMAT As String
[C#]
public static readonly string DEFAULTEXCEPTIONFORMAT;

Remarks

"Exception[ message = $(exception.message), source = $(exception.source), targetsite = $(exception.targetsite), stacktrace = $(exception.stacktrace) ]"

See Also

EntLibLoggerSettings Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerSettings.DEFAULTPRIORITY Field

the default priority used for logging.

[Visual Basic]
Public Shared ReadOnly DEFAULTPRIORITY As Integer
[C#]
public static readonly int DEFAULTPRIORITY;

See Also

EntLibLoggerSettings Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerSettings.exceptionFormat Field

the exception format to be used.

[Visual Basic]
Public ReadOnly exceptionFormat As String
[C#]
public readonly string exceptionFormat;

See Also

EntLibLoggerSettings Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


EntLibLoggerSettings.priority Field

the default priority to be used.

[Visual Basic]
Public ReadOnly priority As Integer
[C#]
public readonly int priority;

See Also

EntLibLoggerSettings Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


SeverityFilter Class

Filters LogEntrys by severity (see TraceEventType).

For a list of all members of this type, see SeverityFilter Members .

System.Object
LogFilter
SeverityFilter

[Visual Basic]
<ConfigurationElementType(ConfigurationType:=Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.CustomLogFilterData)> _
Public Class SeverityFilter
Inherits LogFilter
[C#]
[ConfigurationElementType(ConfigurationType=Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.CustomLogFilterData)]
public class SeverityFilter : LogFilter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.EntLib

Assembly: Common.Logging.EntLib (in Common.Logging.EntLib.dll)

See Also

SeverityFilter Members | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


SeverityFilter Members

SeverityFilter overview

Public Instance Constructors

SeverityFilter Overloaded. Initializes a new instance of the SeverityFilter class.

Public Instance Properties

Name (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Filters.LogFilter) |
SeverityMask | Bitmask to identify severity levels that should be logged.

Public Instance Methods

Equals (inherited from Object) |
Filter | Check, if log severity matches severityMask.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
ShouldLog | Checks, whether the specified severity is allowed to log.
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


SeverityFilter Constructor

Creates a new filter instance

Overload List

Creates a new filter instance

public SeverityFilter(NameValueCollection)

Creates a new filter instance

public SeverityFilter(string,TraceEventType)

Creates a new filter instance

public SeverityFilter(string,int)

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


SeverityFilter Constructor

Creates a new filter instance

[Visual Basic]
Public Overloads Sub New( _
ByVal name As String, _
ByVal severityMask As Integer _
)
[C#]
SeverityFilter(
string name,
int severityMask
);

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace | SeverityFilter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


SeverityFilter Constructor

Creates a new filter instance

[Visual Basic]
Public Overloads Sub New( _
ByVal name As String, _
ByVal severityMask As TraceEventType _
)
[C#]
SeverityFilter(
string name,
TraceEventType severityMask
);

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace | SeverityFilter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


SeverityFilter Constructor

Creates a new filter instance

[Visual Basic]
Public Overloads Sub New( _
ByVal attributes As NameValueCollection _
)
[C#]
SeverityFilter(
NameValueCollection attributes
);

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace | SeverityFilter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


SeverityFilter Properties

The properties of the SeverityFilter class are listed below. For a complete list of SeverityFilter class members, see the SeverityFilter Members topic.

Public Instance Properties

Name (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Filters.LogFilter) |
SeverityMask | Bitmask to identify severity levels that should be logged.

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


SeverityMask Property

Common Logging 2.0 API Reference

SeverityFilter.SeverityMask Property

Bitmask to identify severity levels that should be logged.

[Visual Basic]
Public Property SeverityMask() As Integer
Public Get
End Get
Public Set
End Set
End Property
[C#]
public int SeverityMask { public get; public set; }

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


SeverityFilter Methods

The methods of the SeverityFilter class are listed below. For a complete list of SeverityFilter class members, see the SeverityFilter Members topic.

Public Instance Methods

Equals (inherited from Object) |
Filter | Check, if log severity matches severityMask.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
ShouldLog | Checks, whether the specified severity is allowed to log.
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


SeverityFilter.Filter Method

Check, if log severity matches severityMask.

[Visual Basic]
Public Overrides Sub Filter( _
ByVal log As LogEntry _
) _
Implements ILogFilter.Filter
[C#]
public override bool Filter(
LogEntry log
);

Parameters

log

Return Value

Implements

ILogFilter.Filter

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


SeverityFilter.ShouldLog Method

Checks, whether the specified severity is allowed to log.

[Visual Basic]
Public Sub ShouldLog( _
ByVal severity As TraceEventType _
)
[C#]
public bool ShouldLog(
TraceEventType severity
);

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib [2.0.0.3403] by NDoc3


Common.Logging.EntLib41

Common Logging 2.0 API Reference

Common.Logging.EntLib41 Assembly

This assembly contains the adapter to plug Microsoft Enterprise Logging Library 4.1. into the Common.Logging infrastructure.

For an example on how to configure

  • Common.Logging to render its output to Entlib, see EntLibLoggerFactoryAdapter.
  • Entlib to render its output to Common.Logging use CommonLoggingEntlibTraceListener.

Referenced Assemblies

Assembly Reference | Description
Common.Logging | This assembly contains the core functionality of the Common.Logging framework. In particular, checkout LogManager and ILog for usage information.
Microsoft.Practices.EnterpriseLibrary.Common |
Microsoft.Practices.EnterpriseLibrary.Logging |
Microsoft.Practices.ObjectBuilder2 |
mscorlib |
System |
System.Configuration |

Namespaces

Namespace Description
Common.Logging.EntLib

This namespace contains the implementations to plug Microsoft Enterprise Logging Library 4.1. into the Common.Logging infrastructure.

For an example on how to configure

  • Common.Logging to render its output to Entlib, see EntLibLoggerFactoryAdapter.
  • Entlib to render its output to Common.Logging use CommonLoggingEntlibTraceListener.

Classes

Class | Description
CommonLoggingEntlibTraceListener | Use this TraceListener implementation to route all Entlib logging events to the Common.Logging infrastructure.
CommonLoggingEntlibTraceListenerAssembler | This type supports the Enterprise Library infrastructure and is not intended to be used directly from your code. Represents the process to build a CommonLoggingEntlibTraceListener described by a CommonLoggingEntlibTraceListenerData configuration object.
CommonLoggingEntlibTraceListenerData | Represents the configuration settings that describe a CommonLoggingEntlibTraceListener.
EntLibLogger | Concrete implementation of ILog interface specific to Enterprise Logging 4.1.
EntLibLoggerFactoryAdapter | Adapts the EnterpriseLibrary 4.1 logging system to Common.Logging.
EntLibLoggerSettings | Holds configuration settings for EntLibLoggers.
SeverityFilter | Filters LogEntrys by severity (see TraceEventType).

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


Common.Logging.EntLib

Common Logging 2.0 API Reference

Common.Logging.EntLib Namespace

This namespace contains the implementations to plug Microsoft Enterprise Logging Library 4.1. into the Common.Logging infrastructure.

For an example on how to configure

  • Common.Logging to render its output to Entlib, see EntLibLoggerFactoryAdapter.
  • Entlib to render its output to Common.Logging use CommonLoggingEntlibTraceListener.

Namespace Hierarchy

Classes

Class | Description
CommonLoggingEntlibTraceListener | Use this TraceListener implementation to route all Entlib logging events to the Common.Logging infrastructure.
CommonLoggingEntlibTraceListenerAssembler | This type supports the Enterprise Library infrastructure and is not intended to be used directly from your code. Represents the process to build a CommonLoggingEntlibTraceListener described by a CommonLoggingEntlibTraceListenerData configuration object.
CommonLoggingEntlibTraceListenerData | Represents the configuration settings that describe a CommonLoggingEntlibTraceListener.
EntLibLogger | Concrete implementation of ILog interface specific to Enterprise Logging 4.1.
EntLibLoggerFactoryAdapter | Adapts the EnterpriseLibrary 4.1 logging system to Common.Logging.
EntLibLoggerSettings | Holds configuration settings for EntLibLoggers.
SeverityFilter | Filters LogEntrys by severity (see TraceEventType).


CommonLoggingEntlibTraceListener Class

Use this TraceListener implementation to route all Entlib logging events to the Common.Logging infrastructure.

For a list of all members of this type, see CommonLoggingEntlibTraceListener Members .

System.Object
MarshalByRefObject
TraceListener
FormattedTraceListenerBase
CommonLoggingEntlibTraceListener

[Visual Basic]
Public Class CommonLoggingEntlibTraceListener
Inherits FormattedTraceListenerBase
[C#]
public class CommonLoggingEntlibTraceListener : FormattedTraceListenerBase

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

See CommonLoggingEntlibTraceListenerData for a list of properties to configure.

Example

To route all Logger events to Common.Logging, configure CommonLoggingEntlibTraceListener:

[XML]
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <configSections>
        <section name="loggingConfiguration"
type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
    </configSections>
    <loggingConfiguration name="Logging Application Block" tracingEnabled="true"
        defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
        <listeners>
            <add name="Common.Logging Listener"
                 type="Common.Logging.EntLib.CommonLoggingEntlibTraceListener, Common.Logging.EntLib"
                 listenerDataType="Common.Logging.EntLib.CommonLoggingEntlibTraceListenerData,
Common.Logging.EntLib"
                 loggerNameFormat="{listenerName}.{sourceName}"
                 formatter="Text Formatter"
                 />
        </listeners>
        <formatters>
            <add template="Timestamp: {timestamp}&#xD;&#xA;Message: {message}&#xD;&#xA;Category:
{category}&#xD;&#xA;Priority: {priority}&#xD;&#xA;EventId: {eventid}&#xD;&#xA;Severity:
{severity}&#xD;&#xA;Title:{title}&#xD;&#xA;Machine: {machine}&#xD;&#xA;Application Domain:
{appDomain}&#xD;&#xA;Process Id: {processId}&#xD;&#xA;Process Name: {processName}&#xD;&#xA;Win32
Thread Id: {win32ThreadId}&#xD;&#xA;Thread Name: {threadName}&#xD;&#xA;Extended Properties:
{dictionary({key} - {value}&#xD;&#xA;)}"
                type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
                name="Text Formatter" />
        </formatters>
        <specialSources>
            <allEvents switchValue="All" name="All Events">
                <listeners>
                    <add name="Test Capturing Listener" />
                </listeners>
            </allEvents>
        </specialSources>
    </loggingConfiguration>
</configuration>

Requirements

Namespace: Common.Logging.EntLib

Assembly: Common.Logging.EntLib41 (in Common.Logging.EntLib41.dll)

See Also

CommonLoggingEntlibTraceListener Members | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener Members

CommonLoggingEntlibTraceListener overview

Public Instance Constructors

CommonLoggingEntlibTraceListener Constructor Initializes this instance from CommonLoggingEntlibTraceListenerData configuration information.

Public Instance Properties

Attributes (inherited from TraceListener) |
Filter (inherited from TraceListener) |
Formatter (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase) |
IndentLevel (inherited from TraceListener) |
IndentSize (inherited from TraceListener) |
IsThreadSafe (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase) |
LoggerNameFormat | Format to use for creating the logger name. Defaults to "{listenerName}.{sourceName}".
Name (inherited from TraceListener) |
TraceOutputOptions (inherited from TraceListener) |

Public Instance Methods

Close (inherited from TraceListener) |
CreateObjRef (inherited from MarshalByRefObject) |
Dispose (inherited from TraceListener) | Overloaded.
Equals (inherited from Object) |
Fail (inherited from TraceListener) | Overloaded.
Flush (inherited from TraceListener) |
GetHashCode (inherited from Object) |
GetInstrumentationEventProvider (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase) |
GetLifetimeService (inherited from MarshalByRefObject) |
GetType (inherited from Object) |
InitializeLifetimeService (inherited from MarshalByRefObject) |
ToString (inherited from Object) |
TraceData | Overloaded. Overridden to redirect to call Log.
TraceData (inherited from TraceListener) | Overloaded.
TraceEvent (inherited from TraceListener) | Overloaded.
TraceTransfer (inherited from TraceListener) |
Write | Overloaded. NOT USED BY ENTLIB
Write (inherited from TraceListener) | Overloaded.
WriteLine | Overloaded. NOT USED BY ENTLIB
WriteLine (inherited from TraceListener) | Overloaded.

Protected Instance Properties

InstrumentationProvider (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase)
NeedIndent (inherited from TraceListener)

Protected Instance Methods

Dispose (inherited from TraceListener) | Overloaded.
Finalize (inherited from Object) |
GetSupportedAttributes (inherited from TraceListener) |
Log | Logs the given message to the Common.Logging infrastructure
MemberwiseClone (inherited from MarshalByRefObject) | Overloaded.
MemberwiseClone (inherited from Object) | Overloaded.
WriteIndent (inherited from TraceListener) |

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener Constructor

Initializes this instance from CommonLoggingEntlibTraceListenerData configuration information.

[Visual Basic]
Public Sub New( _
ByVal data As CommonLoggingEntlibTraceListenerData, _
ByVal formatter As ILogFormatter _
)
[C#]
CommonLoggingEntlibTraceListener(
CommonLoggingEntlibTraceListenerData data,
ILogFormatter formatter
);

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener Properties

The properties of the CommonLoggingEntlibTraceListener class are listed below. For a complete list of CommonLoggingEntlibTraceListener class members, see the CommonLoggingEntlibTraceListener Members topic.

Public Instance Properties

Attributes (inherited from TraceListener) |
Filter (inherited from TraceListener) |
Formatter (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase) |
IndentLevel (inherited from TraceListener) |
IndentSize (inherited from TraceListener) |
IsThreadSafe (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase) |
LoggerNameFormat | Format to use for creating the logger name. Defaults to "{listenerName}.{sourceName}".
Name (inherited from TraceListener) |
TraceOutputOptions (inherited from TraceListener) |

Protected Instance Properties

InstrumentationProvider (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase)
NeedIndent (inherited from TraceListener)

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


LoggerNameFormat Property

Common Logging 2.0 API Reference

CommonLoggingEntlibTraceListener.LoggerNameFormat Property

Format to use for creating the logger name. Defaults to "{listenerName}.{sourceName}".

[Visual Basic]
Public ReadOnly Property LoggerNameFormat() As String
Public Get
End Get
End Property
[C#]
public string LoggerNameFormat { public get; }

Remarks

Available placeholders are:

  • {listenerName}: the configured name of this listener instance.
  • {sourceName}: the trace source name an event originates from (see e.g. TraceEvent.

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener Methods

The methods of the CommonLoggingEntlibTraceListener class are listed below. For a complete list of CommonLoggingEntlibTraceListener class members, see the CommonLoggingEntlibTraceListener Members topic.

Public Instance Methods

Close (inherited from TraceListener) |
CreateObjRef (inherited from MarshalByRefObject) |
Dispose (inherited from TraceListener) | Overloaded.
Equals (inherited from Object) |
Fail (inherited from TraceListener) | Overloaded.
Flush (inherited from TraceListener) |
GetHashCode (inherited from Object) |
GetInstrumentationEventProvider (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedTraceListenerBase) |
GetLifetimeService (inherited from MarshalByRefObject) |
GetType (inherited from Object) |
InitializeLifetimeService (inherited from MarshalByRefObject) |
ToString (inherited from Object) |
TraceData | Overloaded. Overridden to redirect to call Log.
TraceData (inherited from TraceListener) | Overloaded.
TraceEvent (inherited from TraceListener) | Overloaded.
TraceTransfer (inherited from TraceListener) |
Write | Overloaded. NOT USED BY ENTLIB
Write (inherited from TraceListener) | Overloaded.
WriteLine | Overloaded. NOT USED BY ENTLIB
WriteLine (inherited from TraceListener) | Overloaded.

Protected Instance Methods

Dispose (inherited from TraceListener) | Overloaded.
Finalize (inherited from Object) |
GetSupportedAttributes (inherited from TraceListener) |
Log | Logs the given message to the Common.Logging infrastructure
MemberwiseClone (inherited from MarshalByRefObject) | Overloaded.
MemberwiseClone (inherited from Object) | Overloaded.
WriteIndent (inherited from TraceListener) |

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener.Log Method

Logs the given message to the Common.Logging infrastructure

[Visual Basic]
Protected Overridable Sub Log( _
ByVal eventType As TraceEventType, _
ByVal source As String, _
ByVal id As Integer, _
ByVal format As String, _
ParamArray args As Object _
)
[C#]
protected virtual void Log(
TraceEventType eventType,
string source,
int id,
string format,
params object[] args
);

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


TraceData Method

Common Logging 2.0 API Reference

CommonLoggingEntlibTraceListener.TraceData Method

Overridden to redirect to call Log.

Overload List

Overridden to redirect to call Log.

public override void TraceData(TraceEventCache,string,TraceEventType,int,object)

Inherited from TraceListener.

public virtual void TraceData(TraceEventCache,string,TraceEventType,int,params object[])

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener.TraceData(TraceEventCache, String, TraceEventType, Int32, Object) Method

Overridden to redirect to call Log.

[Visual Basic]
Public Overrides Overloads Sub TraceData( _
ByVal eventCache As TraceEventCache, _
ByVal source As String, _
ByVal eventType As TraceEventType, _
ByVal id As Integer, _
ByVal data As Object _
)
[C#]
public override void TraceData(
TraceEventCache eventCache,
string source,
TraceEventType eventType,
int id,
object data
);

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace | CommonLoggingEntlibTraceListener.TraceData Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


Write Method

Common Logging 2.0 API Reference

CommonLoggingEntlibTraceListener.Write Method

NOT USED BY ENTLIB

Overload List

Inherited from TraceListener.

public virtual void Write(object)

Inherited from TraceListener.

public virtual void Write(object,string)

NOT USED BY ENTLIB

public override void Write(string)

Inherited from TraceListener.

public virtual void Write(string,string)

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener.Write(String) Method

NOT USED BY ENTLIB

[Visual Basic]
Public Overrides Overloads Sub Write( _
ByVal message As String _
)
[C#]
public override void Write(
string message
);

Exceptions

Exception Type | Condition
NotImplementedException |

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace | CommonLoggingEntlibTraceListener.Write Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


WriteLine Method

Common Logging 2.0 API Reference

CommonLoggingEntlibTraceListener.WriteLine Method

NOT USED BY ENTLIB

Overload List

Inherited from TraceListener.

public virtual void WriteLine(object)

Inherited from TraceListener.

public virtual void WriteLine(object,string)

NOT USED BY ENTLIB

public override void WriteLine(string)

Inherited from TraceListener.

public virtual void WriteLine(string,string)

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListener.WriteLine(String) Method

NOT USED BY ENTLIB

[Visual Basic]
Public Overrides Overloads Sub WriteLine( _
ByVal message As String _
)
[C#]
public override void WriteLine(
string message
);

Exceptions

Exception Type | Condition
NotImplementedException |

See Also

CommonLoggingEntlibTraceListener Class | Common.Logging.EntLib Namespace | CommonLoggingEntlibTraceListener.WriteLine Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerAssembler Class

This type supports the Enterprise Library infrastructure and is not intended to be used directly from your code. Represents the process to build a CommonLoggingEntlibTraceListener described by a CommonLoggingEntlibTraceListenerData configuration object.

For a list of all members of this type, see CommonLoggingEntlibTraceListenerAssembler Members .

System.Object
TraceListenerAsssembler
CommonLoggingEntlibTraceListenerAssembler

[Visual Basic]
Public Class CommonLoggingEntlibTraceListenerAssembler
Inherits TraceListenerAsssembler
[C#]
public class CommonLoggingEntlibTraceListenerAssembler : TraceListenerAsssembler

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.EntLib

Assembly: Common.Logging.EntLib41 (in Common.Logging.EntLib41.dll)

See Also

CommonLoggingEntlibTraceListenerAssembler Members | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerAssembler Members

CommonLoggingEntlibTraceListenerAssembler overview

Public Instance Constructors

CommonLoggingEntlibTraceListenerAssembler Constructor Initializes a new instance of the CommonLoggingEntlibTraceListenerAssembler class.

Public Instance Methods

Assemble | This method supports the Enterprise Library infrastructure and is not intended to be used directly from your code. Builds a CommonLoggingEntlibTraceListener described by a CommonLoggingEntlibTraceListenerData configuration object.
Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
GetFormatter (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerAsssembler)
MemberwiseClone (inherited from Object)

See Also

CommonLoggingEntlibTraceListenerAssembler Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerAssembler Constructor

Initializes a new instance of the CommonLoggingEntlibTraceListenerAssembler class.

[Visual Basic]
Public Sub New()
[C#]
CommonLoggingEntlibTraceListenerAssembler();

See Also

CommonLoggingEntlibTraceListenerAssembler Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerAssembler Methods

The methods of the CommonLoggingEntlibTraceListenerAssembler class are listed below. For a complete list of CommonLoggingEntlibTraceListenerAssembler class members, see the CommonLoggingEntlibTraceListenerAssembler Members topic.

Public Instance Methods

Assemble | This method supports the Enterprise Library infrastructure and is not intended to be used directly from your code. Builds a CommonLoggingEntlibTraceListener described by a CommonLoggingEntlibTraceListenerData configuration object.
Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
GetFormatter (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerAsssembler)
MemberwiseClone (inherited from Object)

See Also

CommonLoggingEntlibTraceListenerAssembler Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerAssembler.Assemble Method

This method supports the Enterprise Library infrastructure and is not intended to be used directly from your code. Builds a CommonLoggingEntlibTraceListener described by a CommonLoggingEntlibTraceListenerData configuration object.

[Visual Basic]
Public Overrides Sub Assemble( _
ByVal context As IBuilderContext, _
ByVal objectConfiguration As TraceListenerData, _
ByVal configurationSource As IConfigurationSource, _
ByVal reflectionCache As ConfigurationReflectionCache _
) _
Implements IAssembler(TraceListener,TraceListenerData).Assemble
[C#]
public override TraceListener Assemble(
IBuilderContext context,
TraceListenerData objectConfiguration,
IConfigurationSource configurationSource,
ConfigurationReflectionCache reflectionCache
);

Implements

IAssembler(TraceListener,TraceListenerData).Assemble

See Also

CommonLoggingEntlibTraceListenerAssembler Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerData Class

Represents the configuration settings that describe a CommonLoggingEntlibTraceListener.

For a list of all members of this type, see CommonLoggingEntlibTraceListenerData Members .

System.Object
ConfigurationElement
NamedConfigurationElement
NameTypeConfigurationElement
TraceListenerData
CommonLoggingEntlibTraceListenerData

[Visual Basic]
<Assembler(AssemblerType:=Common.Logging.EntLib.CommonLoggingEntlibTraceListenerAssembler)> _
<DefaultMember(MemberName:="Item")> _
Public Class CommonLoggingEntlibTraceListenerData
Inherits TraceListenerData
[C#]
[Assembler(AssemblerType=Common.Logging.EntLib.CommonLoggingEntlibTraceListenerAssembler)]
[DefaultMember(MemberName="Item")]
public class CommonLoggingEntlibTraceListenerData : TraceListenerData

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.EntLib

Assembly: Common.Logging.EntLib41 (in Common.Logging.EntLib41.dll)

See Also

CommonLoggingEntlibTraceListenerData Members | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerData Members

CommonLoggingEntlibTraceListenerData overview

Public Instance Constructors

CommonLoggingEntlibTraceListenerData Constructor Initializes a new instance of the CommonLoggingEntlibTraceListenerData class.

Public Instance Properties

ElementInformation (inherited from ConfigurationElement) |
Filter (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerData) |
Formatter | Gets or Sets the formatter name
ListenerDataType (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerData) |
ListenerDataTypeName (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerData) |
LockAllAttributesExcept (inherited from ConfigurationElement) |
LockAllElementsExcept (inherited from ConfigurationElement) |
LockAttributes (inherited from ConfigurationElement) |
LockElements (inherited from ConfigurationElement) |
LockItem (inherited from ConfigurationElement) |
LoggerNameFormat | The logger name format to use for creating logger names from Name and
Name (inherited from Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NamedConfigurationElement) |
TraceOutputOptions (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerData) |
Type (inherited from Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NameTypeConfigurationElement) |
TypeName (inherited from Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NameTypeConfigurationElement) |

Public Instance Methods

DeserializeElement (inherited from Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NamedConfigurationElement) | Overloaded.
Equals (inherited from ConfigurationElement) |
GetHashCode (inherited from ConfigurationElement) |
GetType (inherited from Object) |
IsReadOnly (inherited from ConfigurationElement) |
ToString (inherited from Object) |

Protected Instance Properties

ElementProperty (inherited from ConfigurationElement)
EvaluationContext (inherited from ConfigurationElement)
Item (inherited from ConfigurationElement)
Item (inherited from ConfigurationElement)

Protected Instance Methods

DeserializeElement (inherited from ConfigurationElement) | Overloaded.
Finalize (inherited from Object) |
Init (inherited from ConfigurationElement) |
InitializeDefault (inherited from ConfigurationElement) |
IsModified (inherited from ConfigurationElement) |
ListErrors (inherited from ConfigurationElement) |
MemberwiseClone (inherited from Object) |
OnDeserializeUnrecognizedAttribute (inherited from ConfigurationElement) |
OnDeserializeUnrecognizedElement (inherited from ConfigurationElement) |
OnRequiredPropertyNotFound (inherited from ConfigurationElement) |
PostDeserialize (inherited from ConfigurationElement) |
PreSerialize (inherited from ConfigurationElement) |
Reset (inherited from ConfigurationElement) |
ResetModified (inherited from ConfigurationElement) |
SerializeElement (inherited from ConfigurationElement) |
SerializeToXmlElement (inherited from ConfigurationElement) |
SetPropertyValue (inherited from ConfigurationElement) |
SetReadOnly (inherited from ConfigurationElement) |
Unmerge (inherited from ConfigurationElement) |

See Also

CommonLoggingEntlibTraceListenerData Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerData Constructor

Initializes a new instance of the CommonLoggingEntlibTraceListenerData class.

[Visual Basic]
Public Sub New()
[C#]
CommonLoggingEntlibTraceListenerData();

See Also

CommonLoggingEntlibTraceListenerData Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CommonLoggingEntlibTraceListenerData Properties

The properties of the CommonLoggingEntlibTraceListenerData class are listed below. For a complete list of CommonLoggingEntlibTraceListenerData class members, see the CommonLoggingEntlibTraceListenerData Members topic.

Public Instance Properties

ElementInformation (inherited from ConfigurationElement) |
Filter (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerData) |
Formatter | Gets or Sets the formatter name
ListenerDataType (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerData) |
ListenerDataTypeName (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerData) |
LockAllAttributesExcept (inherited from ConfigurationElement) |
LockAllElementsExcept (inherited from ConfigurationElement) |
LockAttributes (inherited from ConfigurationElement) |
LockElements (inherited from ConfigurationElement) |
LockItem (inherited from ConfigurationElement) |
LoggerNameFormat | The logger name format to use for creating logger names from Name and
Name (inherited from Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NamedConfigurationElement) |
TraceOutputOptions (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.TraceListenerData) |
Type (inherited from Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NameTypeConfigurationElement) |
TypeName (inherited from Microsoft.Practices.EnterpriseLibrary.Common.Configuration.NameTypeConfigurationElement) |

Protected Instance Properties

ElementProperty (inherited from ConfigurationElement)
EvaluationContext (inherited from ConfigurationElement)
Item (inherited from ConfigurationElement)
Item (inherited from ConfigurationElement)

See Also

CommonLoggingEntlibTraceListenerData Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


Formatter Property

Common Logging 2.0 API Reference

CommonLoggingEntlibTraceListenerData.Formatter Property

Gets or Sets the formatter name

[Visual Basic]
<ConfigurationProperty(IsRequired:=False, Name:="formatter", DefaultValue:=System.Object, Options:=ConfigurationPropertyOptions.None, IsDefaultCollection:=False, IsKey:=False)> _
Public Property Formatter() As String
Public Get
End Get
Public Set
End Set
End Property
[C#]
[ConfigurationProperty(IsRequired=False, Name="formatter", DefaultValue=System.Object, Options=ConfigurationPropertyOptions.None, IsDefaultCollection=False, IsKey=False)]
public string Formatter { public get; public set; }

See Also

CommonLoggingEntlibTraceListenerData Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


LoggerNameFormat Property

Common Logging 2.0 API Reference

CommonLoggingEntlibTraceListenerData.LoggerNameFormat Property

The logger name format to use for creating logger names from Name and

[Visual Basic]
<ConfigurationProperty(Name:="loggerNameFormat", DefaultValue:=System.Object, Options:=ConfigurationPropertyOptions.None, IsDefaultCollection:=False, IsRequired:=False, IsKey:=False)> _
Public Property LoggerNameFormat() As String
Public Get
End Get
Public Set
End Set
End Property
[C#]
[ConfigurationProperty(Name="loggerNameFormat", DefaultValue=System.Object, Options=ConfigurationPropertyOptions.None, IsDefaultCollection=False, IsRequired=False, IsKey=False)]
public string LoggerNameFormat { public get; public set; }

See Also

CommonLoggingEntlibTraceListenerData Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLogger Class

Concrete implementation of ILog interface specific to Enterprise Logging 4.1.

For a list of all members of this type, see EntLibLogger Members .

System.Object
AbstractLogger
EntLibLogger

[Visual Basic]
Public Class EntLibLogger
Inherits AbstractLogger
[C#]
public class EntLibLogger : AbstractLogger

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Instances are created by the EntLibLoggerFactoryAdapter. DefaultPriority is used for logging a LogEntry to Write. The category name used is the name passed into GetLogger. For configuring logging, see EntLibLoggerFactoryAdapter.

Requirements

Namespace: Common.Logging.EntLib

Assembly: Common.Logging.EntLib41 (in Common.Logging.EntLib41.dll)

See Also

EntLibLogger Members | Common.Logging.EntLib Namespace | ILog | EntLibLoggerFactoryAdapter

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLogger Members

EntLibLogger overview

Public Instance Constructors

EntLibLogger Constructor Initializes a new instance of the EntLibLogger class.

Public Instance Properties

Category | The category of this logger
IsDebugEnabled | Gets a value indicating whether this instance is debug enabled.
IsErrorEnabled | Gets a value indicating whether this instance is error enabled.
IsFatalEnabled | Gets a value indicating whether this instance is fatal enabled.
IsInfoEnabled | Gets a value indicating whether this instance is info enabled.
IsTraceEnabled | Gets a value indicating whether this instance is trace enabled.
IsWarnEnabled | Gets a value indicating whether this instance is warn enabled.
LogWriter | The LogWriter used by this logger.
Settings | The settings used by this logger

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Methods

AddExceptionInfo | Adds the exception info.
CreateLogEntry | Creates a minimal log entry instance that will be passed into ShouldLog to asap decide, whether this event should be logged.
Finalize (inherited from Object) |
GetTraceEventType | Translates a LogLevel to a TraceEventType.
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
MemberwiseClone (inherited from Object) |
PopulateLogEntry | Configures the log entry.
ShouldLog | May be overridden for custom filter logic
WriteInternal | Actually sends the message to the EnterpriseLogging log system.
WriteLog | Write the fully populated event to the log.

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace | ILog | EntLibLoggerFactoryAdapter

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLogger Constructor

Initializes a new instance of the EntLibLogger class.

[Visual Basic]
Public Sub New( _
ByVal category As String, _
ByVal logWriter As LogWriter, _
ByVal settings As EntLibLoggerSettings _
)
[C#]
EntLibLogger(
string category,
LogWriter logWriter,
EntLibLoggerSettings settings
);

Parameters

category
The category.
logWriter
the LogWriter to write log events to.
settings
the logger settings

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLogger Properties

The properties of the EntLibLogger class are listed below. For a complete list of EntLibLogger class members, see the EntLibLogger Members topic.

Public Instance Properties

Category | The category of this logger
IsDebugEnabled | Gets a value indicating whether this instance is debug enabled.
IsErrorEnabled | Gets a value indicating whether this instance is error enabled.
IsFatalEnabled | Gets a value indicating whether this instance is fatal enabled.
IsInfoEnabled | Gets a value indicating whether this instance is info enabled.
IsTraceEnabled | Gets a value indicating whether this instance is trace enabled.
IsWarnEnabled | Gets a value indicating whether this instance is warn enabled.
LogWriter | The LogWriter used by this logger.
Settings | The settings used by this logger

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace | ILog | EntLibLoggerFactoryAdapter

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


Category Property

Common Logging 2.0 API Reference

EntLibLogger.Category Property

The category of this logger

[Visual Basic]
Public ReadOnly Property Category() As String
Public Get
End Get
End Property
[C#]
public string Category { public get; }

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


IsDebugEnabled Property

Common Logging 2.0 API Reference

EntLibLogger.IsDebugEnabled Property

Gets a value indicating whether this instance is debug enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsDebugEnabled() As Boolean _
Implements ILog.IsDebugEnabled

Public Get
End Get
End Property
[C#]
public override bool IsDebugEnabled { public get; }

Implements

ILog.IsDebugEnabled

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


IsErrorEnabled Property

Common Logging 2.0 API Reference

EntLibLogger.IsErrorEnabled Property

Gets a value indicating whether this instance is error enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsErrorEnabled() As Boolean _
Implements ILog.IsErrorEnabled

Public Get
End Get
End Property
[C#]
public override bool IsErrorEnabled { public get; }

Implements

ILog.IsErrorEnabled

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


IsFatalEnabled Property

Common Logging 2.0 API Reference

EntLibLogger.IsFatalEnabled Property

Gets a value indicating whether this instance is fatal enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsFatalEnabled() As Boolean _
Implements ILog.IsFatalEnabled

Public Get
End Get
End Property
[C#]
public override bool IsFatalEnabled { public get; }

Implements

ILog.IsFatalEnabled

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


IsInfoEnabled Property

Common Logging 2.0 API Reference

EntLibLogger.IsInfoEnabled Property

Gets a value indicating whether this instance is info enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsInfoEnabled() As Boolean _
Implements ILog.IsInfoEnabled

Public Get
End Get
End Property
[C#]
public override bool IsInfoEnabled { public get; }

Implements

ILog.IsInfoEnabled

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


IsTraceEnabled Property

Common Logging 2.0 API Reference

EntLibLogger.IsTraceEnabled Property

Gets a value indicating whether this instance is trace enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsTraceEnabled() As Boolean _
Implements ILog.IsTraceEnabled

Public Get
End Get
End Property
[C#]
public override bool IsTraceEnabled { public get; }

Implements

ILog.IsTraceEnabled

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


IsWarnEnabled Property

Common Logging 2.0 API Reference

EntLibLogger.IsWarnEnabled Property

Gets a value indicating whether this instance is warn enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsWarnEnabled() As Boolean _
Implements ILog.IsWarnEnabled

Public Get
End Get
End Property
[C#]
public override bool IsWarnEnabled { public get; }

Implements

ILog.IsWarnEnabled

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


LogWriter Property

Common Logging 2.0 API Reference

EntLibLogger.LogWriter Property

The LogWriter used by this logger.

[Visual Basic]
Public ReadOnly Property LogWriter() As LogWriter
Public Get
End Get
End Property
[C#]
public LogWriter LogWriter { public get; }

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


Settings Property

Common Logging 2.0 API Reference

EntLibLogger.Settings Property

The settings used by this logger

[Visual Basic]
Public ReadOnly Property Settings() As EntLibLoggerSettings
Public Get
End Get
End Property
[C#]
public EntLibLoggerSettings Settings { public get; }

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLogger Methods

The methods of the EntLibLogger class are listed below. For a complete list of EntLibLogger class members, see the EntLibLogger Members topic.

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Methods

AddExceptionInfo | Adds the exception info.
CreateLogEntry | Creates a minimal log entry instance that will be passed into ShouldLog to asap decide, whether this event should be logged.
Finalize (inherited from Object) |
GetTraceEventType | Translates a LogLevel to a TraceEventType.
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
MemberwiseClone (inherited from Object) |
PopulateLogEntry | Configures the log entry.
ShouldLog | May be overridden for custom filter logic
WriteInternal | Actually sends the message to the EnterpriseLogging log system.
WriteLog | Write the fully populated event to the log.

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace | ILog | EntLibLoggerFactoryAdapter

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLogger.AddExceptionInfo Method

Adds the exception info.

[Visual Basic]
Protected Overridable Sub AddExceptionInfo( _
ByVal log As LogEntry, _
ByVal exception As Exception _
)
[C#]
protected virtual void AddExceptionInfo(
LogEntry log,
Exception exception
);

Parameters

log
The log entry.
exception
The exception.

Return Value

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLogger.CreateLogEntry Method

Creates a minimal log entry instance that will be passed into ShouldLog to asap decide, whether this event should be logged.

[Visual Basic]
Protected Overridable Sub CreateLogEntry( _
ByVal traceEventType As TraceEventType _
)
[C#]
protected virtual LogEntry CreateLogEntry(
TraceEventType traceEventType
);

Parameters

traceEventType
trace event severity.

Return Value

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLogger.GetTraceEventType Method

Translates a LogLevel to a TraceEventType.

[Visual Basic]
Protected Overridable Sub GetTraceEventType( _
ByVal logLevel As LogLevel _
)
[C#]
protected virtual TraceEventType GetTraceEventType(
LogLevel logLevel
);

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLogger.PopulateLogEntry Method

Configures the log entry.

[Visual Basic]
Protected Overridable Sub PopulateLogEntry( _
ByVal log As LogEntry, _
ByVal message As Object, _
ByVal ex As Exception _
)
[C#]
protected virtual void PopulateLogEntry(
LogEntry log,
object message,
Exception ex
);

Parameters

log
The log.
message
The message.
ex
The ex.

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLogger.ShouldLog Method

May be overridden for custom filter logic

[Visual Basic]
Protected Overridable Sub ShouldLog( _
ByVal log As LogEntry _
)
[C#]
protected virtual bool ShouldLog(
LogEntry log
);

Parameters

log

Return Value

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLogger.WriteInternal Method

Actually sends the message to the EnterpriseLogging log system.

[Visual Basic]
Protected Overrides Sub WriteInternal( _
ByVal logLevel As LogLevel, _
ByVal message As Object, _
ByVal exception As Exception _
)
[C#]
protected override void WriteInternal(
LogLevel logLevel,
object message,
Exception exception
);

Parameters

logLevel
the level of this log event.
message
the message to log
exception
the exception to log (may be null)

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLogger.WriteLog Method

Write the fully populated event to the log.

[Visual Basic]
Protected Overridable Sub WriteLog( _
ByVal log As LogEntry _
)
[C#]
protected virtual void WriteLog(
LogEntry log
);

See Also

EntLibLogger Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Class

Adapts the EnterpriseLibrary 4.1 logging system to Common.Logging.

For a list of all members of this type, see EntLibLoggerFactoryAdapter Members .

System.Object
AbstractCachingLoggerFactoryAdapter
EntLibLoggerFactoryAdapter

[Visual Basic]
Public Class EntLibLoggerFactoryAdapter
Inherits AbstractCachingLoggerFactoryAdapter
[C#]
public class EntLibLoggerFactoryAdapter : AbstractCachingLoggerFactoryAdapter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The following configuration property values may be configured:

  • DefaultPriority (see DefaultPriority)
  • ExceptionFormat (see ExceptionFormat)

Example

The following snippet shows how to configure EntLib logging for Common.Logging:

<configuration>
  <configSections>
      <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
      <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  </configSections>
  <common>
    <logging>
      <factoryAdapter type="Common.Logging.EntLib.EntLibLoggerFactoryAdapter, Common.Logging.EntLib41">
        <arg key="DefaultPriority" value="-1" />
      </factoryAdapter>
    </logging>
  </common>
  <loggingConfiguration name="Logging Application Block"
<-- configure enterprise logging application block here -->
...
  </loggingConfiguration>
</configuration>

Requirements

Namespace: Common.Logging.EntLib

Assembly: Common.Logging.EntLib41 (in Common.Logging.EntLib41.dll)

See Also

EntLibLoggerFactoryAdapter Members | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Members

EntLibLoggerFactoryAdapter overview

Public Instance Constructors

EntLibLoggerFactoryAdapter Overloaded. Initializes a new instance of the EntLibLoggerFactoryAdapter class.

Public Instance Properties

DefaultPriority | The default priority used to log events.
ExceptionFormat | The format string used for formatting exceptions
LogWriter | the _logWriter to write log events to.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Overloaded. Creates a new EntLibLogger instance.
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Constructor

Initializes a new instance of the EntLibLoggerFactoryAdapter class.

Overload List

Initializes a new instance of the EntLibLoggerFactoryAdapter class.

public EntLibLoggerFactoryAdapter()

Initializes a new instance of the EntLibLoggerFactoryAdapter class.

public EntLibLoggerFactoryAdapter(NameValueCollection)

Initializes a new instance of the EntLibLoggerFactoryAdapter class with the specified configuration parameters.

public EntLibLoggerFactoryAdapter(int,string,LogWriter)

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Constructor

Initializes a new instance of the EntLibLoggerFactoryAdapter class.

[Visual Basic]
Public Overloads Sub New()
[C#]
EntLibLoggerFactoryAdapter();

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace | EntLibLoggerFactoryAdapter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Constructor

Initializes a new instance of the EntLibLoggerFactoryAdapter class with the specified configuration parameters.

[Visual Basic]
Public Overloads Sub New( _
ByVal defaultPriority As Integer, _
ByVal exceptionFormat As String, _
ByVal logWriter As LogWriter _
)
[C#]
EntLibLoggerFactoryAdapter(
int defaultPriority,
string exceptionFormat,
LogWriter logWriter
);

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace | EntLibLoggerFactoryAdapter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Constructor

Initializes a new instance of the EntLibLoggerFactoryAdapter class.

[Visual Basic]
Public Overloads Sub New( _
ByVal properties As NameValueCollection _
)
[C#]
EntLibLoggerFactoryAdapter(
NameValueCollection properties
);

Parameters

properties
The properties.

Remarks

passed in values are not used, configuration is external to EntLib logging API

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace | EntLibLoggerFactoryAdapter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Properties

The properties of the EntLibLoggerFactoryAdapter class are listed below. For a complete list of EntLibLoggerFactoryAdapter class members, see the EntLibLoggerFactoryAdapter Members topic.

Public Instance Properties

DefaultPriority | The default priority used to log events.
ExceptionFormat | The format string used for formatting exceptions
LogWriter | the _logWriter to write log events to.

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


DefaultPriority Property

Common Logging 2.0 API Reference

EntLibLoggerFactoryAdapter.DefaultPriority Property

The default priority used to log events.

[Visual Basic]
Public ReadOnly Property DefaultPriority() As Integer
Public Get
End Get
End Property
[C#]
public int DefaultPriority { public get; }

Remarks

defaults to DEFAULTPRIORITY

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


ExceptionFormat Property

Common Logging 2.0 API Reference

EntLibLoggerFactoryAdapter.ExceptionFormat Property

The format string used for formatting exceptions

[Visual Basic]
Public ReadOnly Property ExceptionFormat() As String
Public Get
End Get
End Property
[C#]
public string ExceptionFormat { public get; }

Remarks

defaults to DEFAULTEXCEPTIONFORMAT

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


LogWriter Property

Common Logging 2.0 API Reference

EntLibLoggerFactoryAdapter.LogWriter Property

the _logWriter to write log events to.

[Visual Basic]
Public ReadOnly Property LogWriter() As LogWriter
Public Get
End Get
End Property
[C#]
public LogWriter LogWriter { public get; }

Remarks

defaults to Writer.

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter Methods

The methods of the EntLibLoggerFactoryAdapter class are listed below. For a complete list of EntLibLoggerFactoryAdapter class members, see the EntLibLoggerFactoryAdapter Members topic.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Overloaded. Creates a new EntLibLogger instance.
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


CreateLogger Method

Common Logging 2.0 API Reference

EntLibLoggerFactoryAdapter.CreateLogger Method

Creates a new EntLibLogger instance.

Overload List

Creates a new EntLibLogger instance.

protected override ILog CreateLogger(string)

Creates a new EntLibLogger instance.

protected virtual ILog CreateLogger(string,LogWriter,EntLibLoggerSettings)

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter.CreateLogger(String) Method

Creates a new EntLibLogger instance.

[Visual Basic]
Protected Overrides Overloads Sub CreateLogger( _
ByVal name As String _
)
[C#]
protected override ILog CreateLogger(
string name
);

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace | EntLibLoggerFactoryAdapter.CreateLogger Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerFactoryAdapter.CreateLogger(String, LogWriter, EntLibLoggerSettings) Method

Creates a new EntLibLogger instance.

[Visual Basic]
Protected Overridable Overloads Sub CreateLogger( _
ByVal name As String, _
ByVal logWriter As LogWriter, _
ByVal settings As EntLibLoggerSettings _
)
[C#]
protected virtual ILog CreateLogger(
string name,
LogWriter logWriter,
EntLibLoggerSettings settings
);

See Also

EntLibLoggerFactoryAdapter Class | Common.Logging.EntLib Namespace | EntLibLoggerFactoryAdapter.CreateLogger Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerSettings Class

Holds configuration settings for EntLibLoggers.

For a list of all members of this type, see EntLibLoggerSettings Members .

System.Object
EntLibLoggerSettings

[Visual Basic]
Public Class EntLibLoggerSettings
[C#]
public class EntLibLoggerSettings

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.EntLib

Assembly: Common.Logging.EntLib41 (in Common.Logging.EntLib41.dll)

See Also

EntLibLoggerSettings Members | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerSettings Members

EntLibLoggerSettings overview

Public Static (Shared) Fields

DEFAULTEXCEPTIONFORMAT | the default exceptionFormat used for formatting error message
DEFAULTPRIORITY | the default priority used for logging.

Public Instance Constructors

EntLibLoggerSettings Constructor Initializes a new instance.

Public Instance Fields

exceptionFormat | the exception format to be used.
priority | the default priority to be used.

Public Instance Methods

Equals (inherited from Object)
GetHashCode (inherited from Object)
GetType (inherited from Object)
ToString (inherited from Object)

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

EntLibLoggerSettings Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerSettings Constructor

Initializes a new instance.

[Visual Basic]
Public Sub New( _
ByVal defaultPriority As Integer, _
ByVal exceptionFormat As String _
)
[C#]
EntLibLoggerSettings(
int defaultPriority,
string exceptionFormat
);

See Also

EntLibLoggerSettings Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerSettings Fields

The fields of the EntLibLoggerSettings class are listed below. For a complete list of EntLibLoggerSettings class members, see the EntLibLoggerSettings Members topic.

Public Static (Shared) Fields

DEFAULTEXCEPTIONFORMAT | the default exceptionFormat used for formatting error message
DEFAULTPRIORITY | the default priority used for logging.

Public Instance Fields

exceptionFormat | the exception format to be used.
priority | the default priority to be used.

See Also

EntLibLoggerSettings Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerSettings.DEFAULTEXCEPTIONFORMAT Field

the default exceptionFormat used for formatting error message

[Visual Basic]
Public Shared ReadOnly DEFAULTEXCEPTIONFORMAT As String
[C#]
public static readonly string DEFAULTEXCEPTIONFORMAT;

Remarks

"Exception[ message = $(exception.message), source = $(exception.source), targetsite = $(exception.targetsite), stacktrace = $(exception.stacktrace) ]"

See Also

EntLibLoggerSettings Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerSettings.DEFAULTPRIORITY Field

the default priority used for logging.

[Visual Basic]
Public Shared ReadOnly DEFAULTPRIORITY As Integer
[C#]
public static readonly int DEFAULTPRIORITY;

See Also

EntLibLoggerSettings Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerSettings.exceptionFormat Field

the exception format to be used.

[Visual Basic]
Public ReadOnly exceptionFormat As String
[C#]
public readonly string exceptionFormat;

See Also

EntLibLoggerSettings Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


EntLibLoggerSettings.priority Field

the default priority to be used.

[Visual Basic]
Public ReadOnly priority As Integer
[C#]
public readonly int priority;

See Also

EntLibLoggerSettings Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


SeverityFilter Class

Filters LogEntrys by severity (see TraceEventType).

For a list of all members of this type, see SeverityFilter Members .

System.Object
LogFilter
SeverityFilter

[Visual Basic]
<ConfigurationElementType(ConfigurationType:=Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.CustomLogFilterData)> _
Public Class SeverityFilter
Inherits LogFilter
[C#]
[ConfigurationElementType(ConfigurationType=Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.CustomLogFilterData)]
public class SeverityFilter : LogFilter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Requirements

Namespace: Common.Logging.EntLib

Assembly: Common.Logging.EntLib41 (in Common.Logging.EntLib41.dll)

See Also

SeverityFilter Members | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


SeverityFilter Members

SeverityFilter overview

Public Instance Constructors

SeverityFilter Overloaded. Initializes a new instance of the SeverityFilter class.

Public Instance Properties

Name (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Filters.LogFilter) |
SeverityMask | Bitmask to identify severity levels that should be logged.

Public Instance Methods

Equals (inherited from Object) |
Filter | Check, if log severity matches severityMask.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
ShouldLog | Checks, whether the specified severity is allowed to log.
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


SeverityFilter Constructor

Creates a new filter instance

Overload List

Creates a new filter instance

public SeverityFilter(NameValueCollection)

Creates a new filter instance

public SeverityFilter(string,TraceEventType)

Creates a new filter instance

public SeverityFilter(string,int)

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


SeverityFilter Constructor

Creates a new filter instance

[Visual Basic]
Public Overloads Sub New( _
ByVal name As String, _
ByVal severityMask As Integer _
)
[C#]
SeverityFilter(
string name,
int severityMask
);

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace | SeverityFilter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


SeverityFilter Constructor

Creates a new filter instance

[Visual Basic]
Public Overloads Sub New( _
ByVal name As String, _
ByVal severityMask As TraceEventType _
)
[C#]
SeverityFilter(
string name,
TraceEventType severityMask
);

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace | SeverityFilter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


SeverityFilter Constructor

Creates a new filter instance

[Visual Basic]
Public Overloads Sub New( _
ByVal attributes As NameValueCollection _
)
[C#]
SeverityFilter(
NameValueCollection attributes
);

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace | SeverityFilter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


SeverityFilter Properties

The properties of the SeverityFilter class are listed below. For a complete list of SeverityFilter class members, see the SeverityFilter Members topic.

Public Instance Properties

Name (inherited from Microsoft.Practices.EnterpriseLibrary.Logging.Filters.LogFilter) |
SeverityMask | Bitmask to identify severity levels that should be logged.

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


SeverityMask Property

Common Logging 2.0 API Reference

SeverityFilter.SeverityMask Property

Bitmask to identify severity levels that should be logged.

[Visual Basic]
Public Property SeverityMask() As Integer
Public Get
End Get
Public Set
End Set
End Property
[C#]
public int SeverityMask { public get; public set; }

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


SeverityFilter Methods

The methods of the SeverityFilter class are listed below. For a complete list of SeverityFilter class members, see the SeverityFilter Members topic.

Public Instance Methods

Equals (inherited from Object) |
Filter | Check, if log severity matches severityMask.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
ShouldLog | Checks, whether the specified severity is allowed to log.
ToString (inherited from Object) |

Protected Instance Methods

Finalize (inherited from Object)
MemberwiseClone (inherited from Object)

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


SeverityFilter.Filter Method

Check, if log severity matches severityMask.

[Visual Basic]
Public Overrides Sub Filter( _
ByVal log As LogEntry _
) _
Implements ILogFilter.Filter
[C#]
public override bool Filter(
LogEntry log
);

Parameters

log

Return Value

Implements

ILogFilter.Filter

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


SeverityFilter.ShouldLog Method

Checks, whether the specified severity is allowed to log.

[Visual Basic]
Public Sub ShouldLog( _
ByVal severity As TraceEventType _
)
[C#]
public bool ShouldLog(
TraceEventType severity
);

See Also

SeverityFilter Class | Common.Logging.EntLib Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.EntLib41 [2.0.0.3403] by NDoc3


Common.Logging.Log4Net

Common Logging 2.0 API Reference

Common.Logging.Log4Net Assembly

This assembly contains the adapter to the log4net 1.2.10 library

For an example on how to configure

  • Common.Logging to render its output to log4net, see Log4NetLoggerFactoryAdapter.
  • log4net to render its output to Common.Logging use CommonLoggingAppender.

Referenced Assemblies

Assembly Reference | Description
Common.Logging | This assembly contains the core functionality of the Common.Logging framework. In particular, checkout LogManager and ILog for usage information.
log4net |
mscorlib |
System |

Namespaces

Namespace Description
Common.Logging.Log4Net

This namespace contains the implementations to plug log4net 1.2.10 into Common.Logging.

For an example on how to configure

  • Common.Logging to render its output to log4net, see Log4NetLoggerFactoryAdapter.
  • log4net to render its output to Common.Logging use CommonLoggingAppender.

Classes

Class | Description
CommonLoggingAppender | Routes log events to Common.Logging infrastructure.
Log4NetLogger | Concrete implementation of ILog interface specific to log4net 1.2.10.
Log4NetLoggerFactoryAdapter | Concrete subclass of ILoggerFactoryAdapter specific to log4net 1.2.10.

Interfaces

Interface | Description
Log4NetLoggerFactoryAdapter.ILog4NetRuntime | Abstract interface to the underlying log4net runtime

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Common.Logging.Log4Net

Common Logging 2.0 API Reference

Common.Logging.Log4Net Namespace

This namespace contains the implementations to plug log4net 1.2.10 into Common.Logging.

For an example on how to configure

  • Common.Logging to render its output to log4net, see Log4NetLoggerFactoryAdapter.
  • log4net to render its output to Common.Logging use CommonLoggingAppender.

Namespace Hierarchy

Classes

Class | Description
CommonLoggingAppender | Routes log events to Common.Logging infrastructure.
Log4NetLogger | Concrete implementation of ILog interface specific to log4net 1.2.10.
Log4NetLoggerFactoryAdapter | Concrete subclass of ILoggerFactoryAdapter specific to log4net 1.2.10.

Interfaces

Interface | Description
Log4NetLoggerFactoryAdapter.ILog4NetRuntime | Abstract interface to the underlying log4net runtime


CommonLoggingAppender Class

Routes log events to Common.Logging infrastructure.

For a list of all members of this type, see CommonLoggingAppender Members .

System.Object
AppenderSkeleton
CommonLoggingAppender

[Visual Basic]
Public Class CommonLoggingAppender
Inherits AppenderSkeleton
[C#]
public class CommonLoggingAppender : AppenderSkeleton

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Example

To route all events logged using log4net to Common.Logging, you need to configure this appender as shown below:

<log4net>
    <appender name="CommonLoggingAppender"
              type="Common.Logging.Log4Net.CommonLoggingAppender, Common.Logging.Log4Net">
        <layout type="log4net.Layout.PatternLayout, log4net">
            <param name="ConversionPattern" value="%level - %class.%method: %message" />
        </layout>
    </appender>

    <root>
        <level value="ALL" />
        <appender-ref ref="CommonLoggingAppender" />
    </root>
</log4net>

Requirements

Namespace: Common.Logging.Log4Net

Assembly: Common.Logging.Log4Net (in Common.Logging.Log4Net.dll)

See Also

CommonLoggingAppender Members | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


CommonLoggingAppender Members

CommonLoggingAppender overview

Protected Static (Shared) Methods

GetClosestLevel Gets the closest level supported by Common.Logging of the given log4net level

Public Instance Constructors

CommonLoggingAppender Constructor Initializes a new instance of the CommonLoggingAppender class.

Public Instance Properties

ErrorHandler (inherited from log4net.Appender.AppenderSkeleton) |
FilterHead (inherited from log4net.Appender.AppenderSkeleton) |
Layout | Get or set the layout for this appender
Name (inherited from log4net.Appender.AppenderSkeleton) |
Threshold (inherited from log4net.Appender.AppenderSkeleton) |

Public Instance Methods

ActivateOptions (inherited from log4net.Appender.AppenderSkeleton) |
AddFilter (inherited from log4net.Appender.AppenderSkeleton) |
ClearFilters (inherited from log4net.Appender.AppenderSkeleton) |
Close (inherited from log4net.Appender.AppenderSkeleton) |
DoAppend (inherited from log4net.Appender.AppenderSkeleton) | Overloaded.
Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Properties

RequiresLayout (inherited from log4net.Appender.AppenderSkeleton)

Protected Instance Methods

Append | Overloaded. Sends the given log event to Common.Logging
Append (inherited from log4net.Appender.AppenderSkeleton) | Overloaded.
FilterEvent (inherited from log4net.Appender.AppenderSkeleton) |
Finalize (inherited from log4net.Appender.AppenderSkeleton) |
IsAsSevereAsThreshold (inherited from log4net.Appender.AppenderSkeleton) |
MemberwiseClone (inherited from Object) |
OnClose (inherited from log4net.Appender.AppenderSkeleton) |
PreAppendCheck (inherited from log4net.Appender.AppenderSkeleton) |
RenderLoggingEvent (inherited from log4net.Appender.AppenderSkeleton) | Overloaded.

See Also

CommonLoggingAppender Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


CommonLoggingAppender Constructor

Initializes a new instance of the CommonLoggingAppender class.

[Visual Basic]
Public Sub New()
[C#]
CommonLoggingAppender();

See Also

CommonLoggingAppender Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


CommonLoggingAppender Properties

The properties of the CommonLoggingAppender class are listed below. For a complete list of CommonLoggingAppender class members, see the CommonLoggingAppender Members topic.

Public Instance Properties

ErrorHandler (inherited from log4net.Appender.AppenderSkeleton) |
FilterHead (inherited from log4net.Appender.AppenderSkeleton) |
Layout | Get or set the layout for this appender
Name (inherited from log4net.Appender.AppenderSkeleton) |
Threshold (inherited from log4net.Appender.AppenderSkeleton) |

Protected Instance Properties

RequiresLayout (inherited from log4net.Appender.AppenderSkeleton)

See Also

CommonLoggingAppender Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Layout Property

Common Logging 2.0 API Reference

CommonLoggingAppender.Layout Property

Get or set the layout for this appender

[Visual Basic]
Public Overrides Property Layout() As ILayout
Public Get
End Get
Public Set
End Set
End Property
[C#]
public override ILayout Layout { public get; public set; }

See Also

CommonLoggingAppender Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


CommonLoggingAppender Methods

The methods of the CommonLoggingAppender class are listed below. For a complete list of CommonLoggingAppender class members, see the CommonLoggingAppender Members topic.

Protected Static (Shared) Methods

GetClosestLevel Gets the closest level supported by Common.Logging of the given log4net level

Public Instance Methods

ActivateOptions (inherited from log4net.Appender.AppenderSkeleton) |
AddFilter (inherited from log4net.Appender.AppenderSkeleton) |
ClearFilters (inherited from log4net.Appender.AppenderSkeleton) |
Close (inherited from log4net.Appender.AppenderSkeleton) |
DoAppend (inherited from log4net.Appender.AppenderSkeleton) | Overloaded.
Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

Append | Overloaded. Sends the given log event to Common.Logging
Append (inherited from log4net.Appender.AppenderSkeleton) | Overloaded.
FilterEvent (inherited from log4net.Appender.AppenderSkeleton) |
Finalize (inherited from log4net.Appender.AppenderSkeleton) |
IsAsSevereAsThreshold (inherited from log4net.Appender.AppenderSkeleton) |
MemberwiseClone (inherited from Object) |
OnClose (inherited from log4net.Appender.AppenderSkeleton) |
PreAppendCheck (inherited from log4net.Appender.AppenderSkeleton) |
RenderLoggingEvent (inherited from log4net.Appender.AppenderSkeleton) | Overloaded.

See Also

CommonLoggingAppender Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Append Method

Common Logging 2.0 API Reference

CommonLoggingAppender.Append Method

Sends the given log event to Common.Logging

Overload List

Sends the given log event to Common.Logging

protected override void Append(LoggingEvent)

Inherited from AppenderSkeleton.

protected virtual void Append(LoggingEvent[])

See Also

CommonLoggingAppender Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


CommonLoggingAppender.Append(LoggingEvent) Method

Sends the given log event to Common.Logging

[Visual Basic]
Protected Overrides Overloads Sub Append( _
ByVal loggingEvent As LoggingEvent _
)
[C#]
protected override void Append(
LoggingEvent loggingEvent
);

See Also

CommonLoggingAppender Class | Common.Logging.Log4Net Namespace | CommonLoggingAppender.Append Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


CommonLoggingAppender.GetClosestLevel Method

Gets the closest level supported by Common.Logging of the given log4net level

[Visual Basic]
Protected Shared Sub GetClosestLevel( _
ByVal currentLevel As Level _
)
[C#]
protected static Level GetClosestLevel(
Level currentLevel
);

See Also

CommonLoggingAppender Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLogger Class

Concrete implementation of ILog interface specific to log4net 1.2.10.

For a list of all members of this type, see Log4NetLogger Members .

System.Object
AbstractLogger
Log4NetLogger

[Visual Basic]
Public Class Log4NetLogger
Inherits AbstractLogger
[C#]
public class Log4NetLogger : AbstractLogger

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Log4net is capable of outputting extended debug information about where the current message was generated: class name, method name, file, line, etc. Log4net assumes that the location information should be gathered relative to where Debug() was called. When using Common.Logging, Debug() is called in Common.Logging.Log4Net.Log4NetLogger. This means that the location information will indicate that Common.Logging.Log4Net.Log4NetLogger always made the call to Debug(). We need to know where Common.Logging.ILog.Debug() was called. To do this we need to use the log4net.ILog.Logger.Log method and pass in a Type telling log4net where in the stack to begin looking for location information.

Requirements

Namespace: Common.Logging.Log4Net

Assembly: Common.Logging.Log4Net (in Common.Logging.Log4Net.dll)

See Also

Log4NetLogger Members | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLogger Members

Log4NetLogger overview

Public Instance Properties

IsDebugEnabled | Checks if this logger is enabled for the Debug level.
IsErrorEnabled | Checks if this logger is enabled for the Error level.
IsFatalEnabled | Checks if this logger is enabled for the Fatal level.
IsInfoEnabled | Checks if this logger is enabled for the Info level.
IsTraceEnabled | Checks if this logger is enabled for the Trace level.
IsWarnEnabled | Checks if this logger is enabled for the Warn level.

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Constructors

Log4NetLogger Constructor Constructor

Protected Instance Methods

Finalize (inherited from Object) |
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
MemberwiseClone (inherited from Object) |
WriteInternal | Sends the message to the underlying log4net system.

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLogger Constructor

Constructor

[Visual Basic]
Protected Sub New( _
ByVal log As ILoggerWrapper _
)
[C#]
Log4NetLogger(
ILoggerWrapper log
);

Parameters

log

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLogger Properties

The properties of the Log4NetLogger class are listed below. For a complete list of Log4NetLogger class members, see the Log4NetLogger Members topic.

Public Instance Properties

IsDebugEnabled | Checks if this logger is enabled for the Debug level.
IsErrorEnabled | Checks if this logger is enabled for the Error level.
IsFatalEnabled | Checks if this logger is enabled for the Fatal level.
IsInfoEnabled | Checks if this logger is enabled for the Info level.
IsTraceEnabled | Checks if this logger is enabled for the Trace level.
IsWarnEnabled | Checks if this logger is enabled for the Warn level.

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


IsDebugEnabled Property

Common Logging 2.0 API Reference

Log4NetLogger.IsDebugEnabled Property

Checks if this logger is enabled for the Debug level.

[Visual Basic]
Public Overrides ReadOnly Property IsDebugEnabled() As Boolean _
Implements ILog.IsDebugEnabled

Public Get
End Get
End Property
[C#]
public override bool IsDebugEnabled { public get; }

Implements

ILog.IsDebugEnabled

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


IsErrorEnabled Property

Common Logging 2.0 API Reference

Log4NetLogger.IsErrorEnabled Property

Checks if this logger is enabled for the Error level.

[Visual Basic]
Public Overrides ReadOnly Property IsErrorEnabled() As Boolean _
Implements ILog.IsErrorEnabled

Public Get
End Get
End Property
[C#]
public override bool IsErrorEnabled { public get; }

Implements

ILog.IsErrorEnabled

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


IsFatalEnabled Property

Common Logging 2.0 API Reference

Log4NetLogger.IsFatalEnabled Property

Checks if this logger is enabled for the Fatal level.

[Visual Basic]
Public Overrides ReadOnly Property IsFatalEnabled() As Boolean _
Implements ILog.IsFatalEnabled

Public Get
End Get
End Property
[C#]
public override bool IsFatalEnabled { public get; }

Implements

ILog.IsFatalEnabled

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


IsInfoEnabled Property

Common Logging 2.0 API Reference

Log4NetLogger.IsInfoEnabled Property

Checks if this logger is enabled for the Info level.

[Visual Basic]
Public Overrides ReadOnly Property IsInfoEnabled() As Boolean _
Implements ILog.IsInfoEnabled

Public Get
End Get
End Property
[C#]
public override bool IsInfoEnabled { public get; }

Implements

ILog.IsInfoEnabled

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


IsTraceEnabled Property

Common Logging 2.0 API Reference

Log4NetLogger.IsTraceEnabled Property

Checks if this logger is enabled for the Trace level.

[Visual Basic]
Public Overrides ReadOnly Property IsTraceEnabled() As Boolean _
Implements ILog.IsTraceEnabled

Public Get
End Get
End Property
[C#]
public override bool IsTraceEnabled { public get; }

Implements

ILog.IsTraceEnabled

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


IsWarnEnabled Property

Common Logging 2.0 API Reference

Log4NetLogger.IsWarnEnabled Property

Checks if this logger is enabled for the Warn level.

[Visual Basic]
Public Overrides ReadOnly Property IsWarnEnabled() As Boolean _
Implements ILog.IsWarnEnabled

Public Get
End Get
End Property
[C#]
public override bool IsWarnEnabled { public get; }

Implements

ILog.IsWarnEnabled

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLogger Methods

The methods of the Log4NetLogger class are listed below. For a complete list of Log4NetLogger class members, see the Log4NetLogger Members topic.

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Methods

Finalize (inherited from Object) |
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
MemberwiseClone (inherited from Object) |
WriteInternal | Sends the message to the underlying log4net system.

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLogger.WriteInternal Method

Sends the message to the underlying log4net system.

[Visual Basic]
Protected Overrides Sub WriteInternal( _
ByVal logLevel As LogLevel, _
ByVal message As Object, _
ByVal exception As Exception _
)
[C#]
protected override void WriteInternal(
LogLevel logLevel,
object message,
Exception exception
);

Parameters

logLevel
the level of this log event.
message
the message to log
exception
the exception to log (may be null)

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter Class

Concrete subclass of ILoggerFactoryAdapter specific to log4net 1.2.10.

For a list of all members of this type, see Log4NetLoggerFactoryAdapter Members .

System.Object
AbstractCachingLoggerFactoryAdapter
Log4NetLoggerFactoryAdapter

[Visual Basic]
Public Class Log4NetLoggerFactoryAdapter
Inherits AbstractCachingLoggerFactoryAdapter
[C#]
public class Log4NetLoggerFactoryAdapter : AbstractCachingLoggerFactoryAdapter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The following configuration property values may be configured:

  • configType: INLINE|FILE|FILE-WATCH|EXTERNAL
  • configFile: log4net configuration file path in case of FILE or FILE-WATCH
The configType values have the following implications:
  • INLINE: simply calls XmlConfigurator.Configure()
  • FILE: calls XmlConfigurator.Configure(System.IO.FileInfo) using configFile.
  • FILE-WATCH: calls XmlConfigurator.ConfigureAndWatch(System.IO.FileInfo) using configFile.
  • EXTERNAL: does nothing and expects log4net to be configured elsewhere.
  • <any>: calls BasicConfigurator.Configure()

Example

The following snippet shows how to configure EntLib logging for Common.Logging:

<configuration>
  <configSections>
      <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
  </configSections>
  <common>
    <logging>
      <factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net">
        <arg key="configType" value="FILE" />
        <arg key="configFile" value="~/log4net.config" />
      </factoryAdapter>
    </logging>
  </common>
</configuration>

Requirements

Namespace: Common.Logging.Log4Net

Assembly: Common.Logging.Log4Net (in Common.Logging.Log4Net.dll)

See Also

Log4NetLoggerFactoryAdapter Members | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter Members

Log4NetLoggerFactoryAdapter overview

Public Instance Constructors

Log4NetLoggerFactoryAdapter Overloaded. Initializes a new instance of the Log4NetLoggerFactoryAdapter class.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Constructors

Log4NetLoggerFactoryAdapter Overloaded. Initializes a new instance of the Log4NetLoggerFactoryAdapter class.

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Create a ILog instance by name
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

Log4NetLoggerFactoryAdapter Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter Constructor

Constructor

Overload List

Constructor

public Log4NetLoggerFactoryAdapter(NameValueCollection)

Constructor accepting configuration properties and an arbitrary Log4NetLoggerFactoryAdapter.ILog4NetRuntime instance.

protected Log4NetLoggerFactoryAdapter(NameValueCollection,ILog4NetRuntime)

See Also

Log4NetLoggerFactoryAdapter Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter Constructor

Constructor

[Visual Basic]
Public Overloads Sub New( _
ByVal properties As NameValueCollection _
)
[C#]
Log4NetLoggerFactoryAdapter(
NameValueCollection properties
);

Parameters

properties
configuration properties, see Log4NetLoggerFactoryAdapter for more.

See Also

Log4NetLoggerFactoryAdapter Class | Common.Logging.Log4Net Namespace | Log4NetLoggerFactoryAdapter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter Constructor

Constructor accepting configuration properties and an arbitrary Log4NetLoggerFactoryAdapter.ILog4NetRuntime instance.

[Visual Basic]
Protected Overloads Sub New( _
ByVal properties As NameValueCollection, _
ByVal runtime As ILog4NetRuntime _
)
[C#]
Log4NetLoggerFactoryAdapter(
NameValueCollection properties,
ILog4NetRuntime runtime
);

Parameters

properties
configuration properties, see Log4NetLoggerFactoryAdapter for more.
runtime
a log4net runtime adapter

See Also

Log4NetLoggerFactoryAdapter Class | Common.Logging.Log4Net Namespace | Log4NetLoggerFactoryAdapter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter Methods

The methods of the Log4NetLoggerFactoryAdapter class are listed below. For a complete list of Log4NetLoggerFactoryAdapter class members, see the Log4NetLoggerFactoryAdapter Members topic.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Create a ILog instance by name
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

Log4NetLoggerFactoryAdapter Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.CreateLogger Method

Create a ILog instance by name

[Visual Basic]
Protected Overrides Sub CreateLogger( _
ByVal name As String _
)
[C#]
protected override ILog CreateLogger(
string name
);

Parameters

name

Return Value

See Also

Log4NetLoggerFactoryAdapter Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime Interface

Abstract interface to the underlying log4net runtime

For a list of all members of this type, see Log4NetLoggerFactoryAdapter.ILog4NetRuntime Members .

[Visual Basic]
Public Interface ILog4NetRuntime
[C#]
public interface ILog4NetRuntime

Requirements

Namespace: Common.Logging.Log4Net

Assembly: Common.Logging.Log4Net (in Common.Logging.Log4Net.dll)

See Also

Log4NetLoggerFactoryAdapter.ILog4NetRuntime Members | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime Members

Log4NetLoggerFactoryAdapter.ILog4NetRuntime overview

Public Instance Methods

BasicConfiguratorConfigure | Calls Configure
GetLogger | Calls GetLogger
XmlConfiguratorConfigure | Overloaded. Calls Configure
XmlConfiguratorConfigureAndWatch | Calls ConfigureAndWatch

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime Methods

The methods of the Log4NetLoggerFactoryAdapter.ILog4NetRuntime interface are listed below. For a complete list of Log4NetLoggerFactoryAdapter.ILog4NetRuntime interface members, see the Log4NetLoggerFactoryAdapter.ILog4NetRuntime Members topic.

Public Instance Methods

BasicConfiguratorConfigure | Calls Configure
GetLogger | Calls GetLogger
XmlConfiguratorConfigure | Overloaded. Calls Configure
XmlConfiguratorConfigureAndWatch | Calls ConfigureAndWatch

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime.BasicConfiguratorConfigure Method

Calls Configure

[Visual Basic]
Public Sub BasicConfiguratorConfigure()
[C#]
void BasicConfiguratorConfigure();

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime.GetLogger Method

Calls GetLogger

[Visual Basic]
Public Sub GetLogger( _
ByVal name As String _
)
[C#]
ILog GetLogger(
string name
);

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


XmlConfiguratorConfigure Method

Common Logging 2.0 API Reference

Log4NetLoggerFactoryAdapter.ILog4NetRuntime.XmlConfiguratorConfigure Method

Calls Configure

Overload List

Calls Configure

void XmlConfiguratorConfigure()

Calls Configure

void XmlConfiguratorConfigure(string)

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime.XmlConfiguratorConfigure() Method

Calls Configure

[Visual Basic]
Public Sub XmlConfiguratorConfigure()
[C#]
void XmlConfiguratorConfigure();

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace | ILog4NetRuntime.XmlConfiguratorConfigure Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime.XmlConfiguratorConfigure(String) Method

Calls Configure

[Visual Basic]
Public Sub XmlConfiguratorConfigure( _
ByVal configFile As String _
)
[C#]
void XmlConfiguratorConfigure(
string configFile
);

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace | ILog4NetRuntime.XmlConfiguratorConfigure Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime.XmlConfiguratorConfigureAndWatch Method

Calls ConfigureAndWatch

[Visual Basic]
Public Sub XmlConfiguratorConfigureAndWatch( _
ByVal configFile As String _
)
[C#]
void XmlConfiguratorConfigureAndWatch(
string configFile
);

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net [2.0.0.3403] by NDoc3


Common.Logging.Log4Net129

Common Logging 2.0 API Reference

Common.Logging.Log4Net129 Assembly

This assembly contains the adapter to the log4net 1.2.9 library

For an example on how to configure

  • Common.Logging to render its output to log4net, see Log4NetLoggerFactoryAdapter.
  • log4net to render its output to Common.Logging use CommonLoggingAppender.

Referenced Assemblies

Assembly Reference | Description
Common.Logging | This assembly contains the core functionality of the Common.Logging framework. In particular, checkout LogManager and ILog for usage information.
log4net |
mscorlib |
mscorlib |
System |

Namespaces

Namespace Description
Common.Logging.Log4Net

This namespace contains the implementations to plug log4net 1.2.9 into Common.Logging.

For an example on how to configure

  • Common.Logging to render its output to log4net, see Log4NetLoggerFactoryAdapter.
  • log4net to render its output to Common.Logging use CommonLoggingAppender.

Classes

Class | Description
CommonLoggingAppender | Routes log events to Common.Logging infrastructure.
Log4NetLogger | Concrete implementation of ILog interface specific to log4net 1.2.9.
Log4NetLoggerFactoryAdapter | Concrete subclass of ILoggerFactoryAdapter specific to log4net 1.2.9.

Interfaces

Interface | Description
Log4NetLoggerFactoryAdapter.ILog4NetRuntime | Abstract interface to the underlying log4net runtime

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Common.Logging.Log4Net

Common Logging 2.0 API Reference

Common.Logging.Log4Net Namespace

This namespace contains the implementations to plug log4net 1.2.9 into Common.Logging.

For an example on how to configure

  • Common.Logging to render its output to log4net, see Log4NetLoggerFactoryAdapter.
  • log4net to render its output to Common.Logging use CommonLoggingAppender.

Namespace Hierarchy

Classes

Class | Description
CommonLoggingAppender | Routes log events to Common.Logging infrastructure.
Log4NetLogger | Concrete implementation of ILog interface specific to log4net 1.2.9.
Log4NetLoggerFactoryAdapter | Concrete subclass of ILoggerFactoryAdapter specific to log4net 1.2.9.

Interfaces

Interface | Description
Log4NetLoggerFactoryAdapter.ILog4NetRuntime | Abstract interface to the underlying log4net runtime


CommonLoggingAppender Class

Routes log events to Common.Logging infrastructure.

For a list of all members of this type, see CommonLoggingAppender Members .

System.Object
AppenderSkeleton
CommonLoggingAppender

[Visual Basic]
Public Class CommonLoggingAppender
Inherits AppenderSkeleton
[C#]
public class CommonLoggingAppender : AppenderSkeleton

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Example

To route all events logged using log4net to Common.Logging, you need to configure this appender as shown below:

<log4net>
    <appender name="CommonLoggingAppender"
              type="Common.Logging.Log4Net.CommonLoggingAppender, Common.Logging.Log4Net129">
        <layout type="log4net.Layout.PatternLayout, log4net">
            <param name="ConversionPattern" value="%level - %class.%method: %message" />
        </layout>
    </appender>

    <root>
        <level value="ALL" />
        <appender-ref ref="CommonLoggingAppender" />
    </root>
</log4net>

Requirements

Namespace: Common.Logging.Log4Net

Assembly: Common.Logging.Log4Net129 (in Common.Logging.Log4Net129.dll)

See Also

CommonLoggingAppender Members | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


CommonLoggingAppender Members

CommonLoggingAppender overview

Protected Static (Shared) Methods

GetClosestLevel Gets the closest level supported by Common.Logging of the given log4net level

Public Instance Constructors

CommonLoggingAppender Constructor Initializes a new instance of the CommonLoggingAppender class.

Public Instance Properties

ErrorHandler (inherited from log4net.Appender.AppenderSkeleton) |
FilterHead (inherited from log4net.Appender.AppenderSkeleton) |
Layout | Get or set the layout for this appender
Name (inherited from log4net.Appender.AppenderSkeleton) |
Threshold (inherited from log4net.Appender.AppenderSkeleton) |

Public Instance Methods

ActivateOptions (inherited from log4net.Appender.AppenderSkeleton)
AddFilter (inherited from log4net.Appender.AppenderSkeleton)
ClearFilters (inherited from log4net.Appender.AppenderSkeleton)
Close (inherited from log4net.Appender.AppenderSkeleton)
DoAppend (inherited from log4net.Appender.AppenderSkeleton)
Equals (inherited from Object)
GetHashCode (inherited from Object)
GetType (inherited from Object)
ToString (inherited from Object)

Protected Instance Properties

RequiresLayout (inherited from log4net.Appender.AppenderSkeleton)

Protected Instance Methods

Append | Sends the given log event to Common.Logging
Finalize (inherited from log4net.Appender.AppenderSkeleton) |
IsAsSevereAsThreshold (inherited from log4net.Appender.AppenderSkeleton) |
MemberwiseClone (inherited from Object) |
OnClose (inherited from log4net.Appender.AppenderSkeleton) |
PreAppendCheck (inherited from log4net.Appender.AppenderSkeleton) |
RenderLoggingEvent (inherited from log4net.Appender.AppenderSkeleton) | Overloaded.

See Also

CommonLoggingAppender Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


CommonLoggingAppender Constructor

Initializes a new instance of the CommonLoggingAppender class.

[Visual Basic]
Public Sub New()
[C#]
CommonLoggingAppender();

See Also

CommonLoggingAppender Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


CommonLoggingAppender Properties

The properties of the CommonLoggingAppender class are listed below. For a complete list of CommonLoggingAppender class members, see the CommonLoggingAppender Members topic.

Public Instance Properties

ErrorHandler (inherited from log4net.Appender.AppenderSkeleton) |
FilterHead (inherited from log4net.Appender.AppenderSkeleton) |
Layout | Get or set the layout for this appender
Name (inherited from log4net.Appender.AppenderSkeleton) |
Threshold (inherited from log4net.Appender.AppenderSkeleton) |

Protected Instance Properties

RequiresLayout (inherited from log4net.Appender.AppenderSkeleton)

See Also

CommonLoggingAppender Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Layout Property

Common Logging 2.0 API Reference

CommonLoggingAppender.Layout Property

Get or set the layout for this appender

[Visual Basic]
Public Overrides Property Layout() As ILayout
Public Get
End Get
Public Set
End Set
End Property
[C#]
public override ILayout Layout { public get; public set; }

See Also

CommonLoggingAppender Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


CommonLoggingAppender Methods

The methods of the CommonLoggingAppender class are listed below. For a complete list of CommonLoggingAppender class members, see the CommonLoggingAppender Members topic.

Protected Static (Shared) Methods

GetClosestLevel Gets the closest level supported by Common.Logging of the given log4net level

Public Instance Methods

ActivateOptions (inherited from log4net.Appender.AppenderSkeleton)
AddFilter (inherited from log4net.Appender.AppenderSkeleton)
ClearFilters (inherited from log4net.Appender.AppenderSkeleton)
Close (inherited from log4net.Appender.AppenderSkeleton)
DoAppend (inherited from log4net.Appender.AppenderSkeleton)
Equals (inherited from Object)
GetHashCode (inherited from Object)
GetType (inherited from Object)
ToString (inherited from Object)

Protected Instance Methods

Append | Sends the given log event to Common.Logging
Finalize (inherited from log4net.Appender.AppenderSkeleton) |
IsAsSevereAsThreshold (inherited from log4net.Appender.AppenderSkeleton) |
MemberwiseClone (inherited from Object) |
OnClose (inherited from log4net.Appender.AppenderSkeleton) |
PreAppendCheck (inherited from log4net.Appender.AppenderSkeleton) |
RenderLoggingEvent (inherited from log4net.Appender.AppenderSkeleton) | Overloaded.

See Also

CommonLoggingAppender Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


CommonLoggingAppender.Append Method

Sends the given log event to Common.Logging

[Visual Basic]
Protected Overrides Sub Append( _
ByVal loggingEvent As LoggingEvent _
)
[C#]
protected override void Append(
LoggingEvent loggingEvent
);

See Also

CommonLoggingAppender Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


CommonLoggingAppender.GetClosestLevel Method

Gets the closest level supported by Common.Logging of the given log4net level

[Visual Basic]
Protected Shared Sub GetClosestLevel( _
ByVal currentLevel As Level _
)
[C#]
protected static Level GetClosestLevel(
Level currentLevel
);

See Also

CommonLoggingAppender Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLogger Class

Concrete implementation of ILog interface specific to log4net 1.2.9.

For a list of all members of this type, see Log4NetLogger Members .

System.Object
AbstractLogger
Log4NetLogger

[Visual Basic]
<Serializable> _
Public Class Log4NetLogger
Inherits AbstractLogger
[C#]
[Serializable]
public class Log4NetLogger : AbstractLogger

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Log4net is capable of outputting extended debug information about where the current message was generated: class name, method name, file, line, etc. Log4net assumes that the location information should be gathered relative to where Debug() was called. When using Common.Logging, Debug() is called in Common.Logging.Log4Net.Log4NetLogger. This means that the location information will indicate that Common.Logging.Log4Net.Log4NetLogger always made the call to Debug(). We need to know where Common.Logging.ILog.Debug() was called. To do this we need to use the log4net.ILog.Logger.Log method and pass in a Type telling log4net where in the stack to begin looking for location information.

Requirements

Namespace: Common.Logging.Log4Net

Assembly: Common.Logging.Log4Net129 (in Common.Logging.Log4Net129.dll)

See Also

Log4NetLogger Members | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLogger Members

Log4NetLogger overview

Public Instance Properties

IsDebugEnabled | Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsDebugEnabled
IsErrorEnabled | Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsErrorEnabled
IsFatalEnabled | Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsFatalEnabled
IsInfoEnabled | Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsInfoEnabled
IsTraceEnabled | Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsTraceEnabled
IsWarnEnabled | Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsWarnEnabled

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Constructors

Log4NetLogger Constructor Constructor

Protected Instance Methods

Finalize (inherited from Object) |
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
MemberwiseClone (inherited from Object) |
WriteInternal | Actually sends the message to the underlying log system.

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLogger Constructor

Constructor

[Visual Basic]
Protected Sub New( _
ByVal log As ILoggerWrapper _
)
[C#]
Log4NetLogger(
ILoggerWrapper log
);

Parameters

log

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLogger Properties

The properties of the Log4NetLogger class are listed below. For a complete list of Log4NetLogger class members, see the Log4NetLogger Members topic.

Public Instance Properties

IsDebugEnabled | Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsDebugEnabled
IsErrorEnabled | Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsErrorEnabled
IsFatalEnabled | Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsFatalEnabled
IsInfoEnabled | Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsInfoEnabled
IsTraceEnabled | Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsTraceEnabled
IsWarnEnabled | Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsWarnEnabled

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


IsDebugEnabled Property

Common Logging 2.0 API Reference

Log4NetLogger.IsDebugEnabled Property

Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsDebugEnabled

[Visual Basic]
Public Overrides ReadOnly Property IsDebugEnabled() As Boolean _
Implements ILog.IsDebugEnabled

Public Get
End Get
End Property
[C#]
public override bool IsDebugEnabled { public get; }

Implements

ILog.IsDebugEnabled

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


IsErrorEnabled Property

Common Logging 2.0 API Reference

Log4NetLogger.IsErrorEnabled Property

Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsErrorEnabled

[Visual Basic]
Public Overrides ReadOnly Property IsErrorEnabled() As Boolean _
Implements ILog.IsErrorEnabled

Public Get
End Get
End Property
[C#]
public override bool IsErrorEnabled { public get; }

Implements

ILog.IsErrorEnabled

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


IsFatalEnabled Property

Common Logging 2.0 API Reference

Log4NetLogger.IsFatalEnabled Property

Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsFatalEnabled

[Visual Basic]
Public Overrides ReadOnly Property IsFatalEnabled() As Boolean _
Implements ILog.IsFatalEnabled

Public Get
End Get
End Property
[C#]
public override bool IsFatalEnabled { public get; }

Implements

ILog.IsFatalEnabled

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


IsInfoEnabled Property

Common Logging 2.0 API Reference

Log4NetLogger.IsInfoEnabled Property

Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsInfoEnabled

[Visual Basic]
Public Overrides ReadOnly Property IsInfoEnabled() As Boolean _
Implements ILog.IsInfoEnabled

Public Get
End Get
End Property
[C#]
public override bool IsInfoEnabled { public get; }

Implements

ILog.IsInfoEnabled

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


IsTraceEnabled Property

Common Logging 2.0 API Reference

Log4NetLogger.IsTraceEnabled Property

Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsTraceEnabled

[Visual Basic]
Public Overrides ReadOnly Property IsTraceEnabled() As Boolean _
Implements ILog.IsTraceEnabled

Public Get
End Get
End Property
[C#]
public override bool IsTraceEnabled { public get; }

Implements

ILog.IsTraceEnabled

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


IsWarnEnabled Property

Common Logging 2.0 API Reference

Log4NetLogger.IsWarnEnabled Property

Missing <summary> documentation for P:Common.Logging.Log4Net.Log4NetLogger.IsWarnEnabled

[Visual Basic]
Public Overrides ReadOnly Property IsWarnEnabled() As Boolean _
Implements ILog.IsWarnEnabled

Public Get
End Get
End Property
[C#]
public override bool IsWarnEnabled { public get; }

Implements

ILog.IsWarnEnabled

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLogger Methods

The methods of the Log4NetLogger class are listed below. For a complete list of Log4NetLogger class members, see the Log4NetLogger Members topic.

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Methods

Finalize (inherited from Object) |
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
MemberwiseClone (inherited from Object) |
WriteInternal | Actually sends the message to the underlying log system.

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLogger.WriteInternal Method

Actually sends the message to the underlying log system.

[Visual Basic]
Protected Overrides Sub WriteInternal( _
ByVal logLevel As LogLevel, _
ByVal message As Object, _
ByVal exception As Exception _
)
[C#]
protected override void WriteInternal(
LogLevel logLevel,
object message,
Exception exception
);

Parameters

logLevel
the level of this log event.
message
the message to log
exception
the exception to log (may be null)

See Also

Log4NetLogger Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter Class

Concrete subclass of ILoggerFactoryAdapter specific to log4net 1.2.9.

For a list of all members of this type, see Log4NetLoggerFactoryAdapter Members .

System.Object
AbstractCachingLoggerFactoryAdapter
Log4NetLoggerFactoryAdapter

[Visual Basic]
Public Class Log4NetLoggerFactoryAdapter
Inherits AbstractCachingLoggerFactoryAdapter
[C#]
public class Log4NetLoggerFactoryAdapter : AbstractCachingLoggerFactoryAdapter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The following configuration property values may be configured:

  • configType: INLINE|FILE|FILE-WATCH|EXTERNAL
  • configFile: log4net configuration file path in case of FILE or FILE-WATCH
The configType values have the following implications:
  • INLINE: simply calls XmlConfigurator.Configure()
  • FILE: calls XmlConfigurator.Configure(System.IO.FileInfo) using configFile.
  • FILE-WATCH: calls XmlConfigurator.ConfigureAndWatch(System.IO.FileInfo) using configFile.
  • EXTERNAL: does nothing and expects log4net to be configured elsewhere.
  • <any>: calls BasicConfigurator.Configure()

Example

The following snippet shows how to configure EntLib logging for Common.Logging:

<configuration>
  <configSections>
      <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
  </configSections>
  <common>
    <logging>
      <factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net129">
        <arg key="configType" value="FILE" />
        <arg key="configFile" value="~/log4net.config" />
      </factoryAdapter>
    </logging>
  </common>
</configuration>

Requirements

Namespace: Common.Logging.Log4Net

Assembly: Common.Logging.Log4Net129 (in Common.Logging.Log4Net129.dll)

See Also

Log4NetLoggerFactoryAdapter Members | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter Members

Log4NetLoggerFactoryAdapter overview

Public Instance Constructors

Log4NetLoggerFactoryAdapter Overloaded. Initializes a new instance of the Log4NetLoggerFactoryAdapter class.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Constructors

Log4NetLoggerFactoryAdapter Overloaded. Initializes a new instance of the Log4NetLoggerFactoryAdapter class.

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Create a ILog instance by name
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

Log4NetLoggerFactoryAdapter Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter Constructor

Constructor

Overload List

Constructor

public Log4NetLoggerFactoryAdapter(NameValueCollection)

Constructor accepting configuration properties and an arbitrary Log4NetLoggerFactoryAdapter.ILog4NetRuntime instance.

protected Log4NetLoggerFactoryAdapter(NameValueCollection,ILog4NetRuntime)

See Also

Log4NetLoggerFactoryAdapter Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter Constructor

Constructor

[Visual Basic]
Public Overloads Sub New( _
ByVal properties As NameValueCollection _
)
[C#]
Log4NetLoggerFactoryAdapter(
NameValueCollection properties
);

Parameters

properties
configuration properties, see Log4NetLoggerFactoryAdapter for more.

See Also

Log4NetLoggerFactoryAdapter Class | Common.Logging.Log4Net Namespace | Log4NetLoggerFactoryAdapter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter Constructor

Constructor accepting configuration properties and an arbitrary Log4NetLoggerFactoryAdapter.ILog4NetRuntime instance.

[Visual Basic]
Protected Overloads Sub New( _
ByVal properties As NameValueCollection, _
ByVal runtime As ILog4NetRuntime _
)
[C#]
Log4NetLoggerFactoryAdapter(
NameValueCollection properties,
ILog4NetRuntime runtime
);

Parameters

properties
configuration properties, see Log4NetLoggerFactoryAdapter for more.
runtime
a log4net runtime adapter

See Also

Log4NetLoggerFactoryAdapter Class | Common.Logging.Log4Net Namespace | Log4NetLoggerFactoryAdapter Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter Methods

The methods of the Log4NetLoggerFactoryAdapter class are listed below. For a complete list of Log4NetLoggerFactoryAdapter class members, see the Log4NetLoggerFactoryAdapter Members topic.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Create a ILog instance by name
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

Log4NetLoggerFactoryAdapter Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.CreateLogger Method

Create a ILog instance by name

[Visual Basic]
Protected Overrides Sub CreateLogger( _
ByVal name As String _
)
[C#]
protected override ILog CreateLogger(
string name
);

Parameters

name

Return Value

See Also

Log4NetLoggerFactoryAdapter Class | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime Interface

Abstract interface to the underlying log4net runtime

For a list of all members of this type, see Log4NetLoggerFactoryAdapter.ILog4NetRuntime Members .

[Visual Basic]
Public Interface ILog4NetRuntime
[C#]
public interface ILog4NetRuntime

Requirements

Namespace: Common.Logging.Log4Net

Assembly: Common.Logging.Log4Net129 (in Common.Logging.Log4Net129.dll)

See Also

Log4NetLoggerFactoryAdapter.ILog4NetRuntime Members | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime Members

Log4NetLoggerFactoryAdapter.ILog4NetRuntime overview

Public Instance Methods

BasicConfiguratorConfigure | Calls Configure
GetLogger | Calls GetLogger
XmlConfiguratorConfigure | Overloaded. Calls Configure
XmlConfiguratorConfigureAndWatch | Calls ConfigureAndWatch

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime Methods

The methods of the Log4NetLoggerFactoryAdapter.ILog4NetRuntime interface are listed below. For a complete list of Log4NetLoggerFactoryAdapter.ILog4NetRuntime interface members, see the Log4NetLoggerFactoryAdapter.ILog4NetRuntime Members topic.

Public Instance Methods

BasicConfiguratorConfigure | Calls Configure
GetLogger | Calls GetLogger
XmlConfiguratorConfigure | Overloaded. Calls Configure
XmlConfiguratorConfigureAndWatch | Calls ConfigureAndWatch

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime.BasicConfiguratorConfigure Method

Calls Configure

[Visual Basic]
Public Sub BasicConfiguratorConfigure()
[C#]
void BasicConfiguratorConfigure();

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime.GetLogger Method

Calls GetLogger

[Visual Basic]
Public Sub GetLogger( _
ByVal name As String _
)
[C#]
ILog GetLogger(
string name
);

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


XmlConfiguratorConfigure Method

Common Logging 2.0 API Reference

Log4NetLoggerFactoryAdapter.ILog4NetRuntime.XmlConfiguratorConfigure Method

Calls Configure

Overload List

Calls Configure

void XmlConfiguratorConfigure()

Calls Configure

void XmlConfiguratorConfigure(string)

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime.XmlConfiguratorConfigure() Method

Calls Configure

[Visual Basic]
Public Sub XmlConfiguratorConfigure()
[C#]
void XmlConfiguratorConfigure();

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace | ILog4NetRuntime.XmlConfiguratorConfigure Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime.XmlConfiguratorConfigure(String) Method

Calls Configure

[Visual Basic]
Public Sub XmlConfiguratorConfigure( _
ByVal configFile As String _
)
[C#]
void XmlConfiguratorConfigure(
string configFile
);

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace | ILog4NetRuntime.XmlConfiguratorConfigure Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Log4NetLoggerFactoryAdapter.ILog4NetRuntime.XmlConfiguratorConfigureAndWatch Method

Calls ConfigureAndWatch

[Visual Basic]
Public Sub XmlConfiguratorConfigureAndWatch( _
ByVal configFile As String _
)
[C#]
void XmlConfiguratorConfigureAndWatch(
string configFile
);

See Also

ILog4NetRuntime Interface | Common.Logging.Log4Net Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.Log4Net129 [2.0.0.3403] by NDoc3


Common.Logging.NLog

Common Logging 2.0 API Reference

Common.Logging.NLog Assembly

This assembly contains the implementations to plug NLog 1.0.0.505 into Common.Logging.

For an example on how to configure

  • Common.Logging to render its output to Entlib, see NLogLoggerFactoryAdapter.
  • NLog to render its output to Common.Logging use CommonLoggingTarget.

Referenced Assemblies

Assembly Reference | Description
Common.Logging | This assembly contains the core functionality of the Common.Logging framework. In particular, checkout LogManager and ILog for usage information.
mscorlib |
NLog |
System |

Namespaces

Namespace Description
Common.Logging.NLog

This namespace contains the implementations to plug NLog 1.0.0.505 into Common.Logging.

For an example on how to configure

  • Common.Logging to render its output to Entlib, see NLogLoggerFactoryAdapter.
  • NLog to render its output to Common.Logging use CommonLoggingTarget.

Classes

Class | Description
CommonLoggingTarget | Routes all log events logged through NLog into the Common.Logging infrastructure.
NLogLogger | Concrete implementation of ILog interface specific to NLog 1.0.0.505.
NLogLoggerFactoryAdapter | Concrete subclass of ILoggerFactoryAdapter specific to NLog 1.0.0.505.

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


Common.Logging.NLog

Common Logging 2.0 API Reference

Common.Logging.NLog Namespace

This namespace contains the implementations to plug NLog 1.0.0.505 into Common.Logging.

For an example on how to configure

  • Common.Logging to render its output to Entlib, see NLogLoggerFactoryAdapter.
  • NLog to render its output to Common.Logging use CommonLoggingTarget.

Namespace Hierarchy

Classes

Class | Description
CommonLoggingTarget | Routes all log events logged through NLog into the Common.Logging infrastructure.
NLogLogger | Concrete implementation of ILog interface specific to NLog 1.0.0.505.
NLogLoggerFactoryAdapter | Concrete subclass of ILoggerFactoryAdapter specific to NLog 1.0.0.505.


CommonLoggingTarget Class

Routes all log events logged through NLog into the Common.Logging infrastructure.

For a list of all members of this type, see CommonLoggingTarget Members .

System.Object
Target
TargetWithLayout
CommonLoggingTarget

[Visual Basic]
Public Class CommonLoggingTarget
Inherits TargetWithLayout
[C#]
public class CommonLoggingTarget : TargetWithLayout

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

To route all NLog events to Common.Logging, you must add this target to your configuration:

LoggingConfiguration cfg = new LoggingConfiguration();
CommonLoggingTarget target = new CommonLoggingTarget("${level:uppercase=true}|${logger}|${message}");
cfg.LoggingRules.Add(new LoggingRule("*", LogLevel.Trace, target));

LogManager.Configuration = cfg;

Logger log = LogManager.GetLogger("mylogger");
log.Debug("some message");

Requirements

Namespace: Common.Logging.NLog

Assembly: Common.Logging.NLog (in Common.Logging.NLog.dll)

See Also

CommonLoggingTarget Members | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


CommonLoggingTarget Members

CommonLoggingTarget overview

Public Instance Constructors

CommonLoggingTarget Overloaded. Initializes a new instance of the CommonLoggingTarget class.

Public Instance Properties

CompiledLayout (inherited from NLog.TargetWithLayout)
Layout (inherited from NLog.TargetWithLayout)
Name (inherited from NLog.Target)

Public Instance Methods

Equals (inherited from Object) |
Flush (inherited from NLog.Target) | Overloaded.
GetHashCode (inherited from Object) |
GetLayouts (inherited from NLog.Target) |
GetType (inherited from Object) |
Initialize (inherited from NLog.TargetWithLayout) |
PopulateLayouts (inherited from NLog.TargetWithLayout) |
PrecalculateVolatileLayouts (inherited from NLog.Target) |
ToString (inherited from NLog.Target) |

Protected Instance Methods

Close (inherited from NLog.Target) |
Finalize (inherited from Object) |
InvalidateLayouts (inherited from NLog.Target) |
MemberwiseClone (inherited from Object) |
NeedsStackTrace (inherited from NLog.Target) |
Write | Overloaded. Writes the event to the Common.Logging infrastructure
Write (inherited from NLog.Target) | Overloaded.

See Also

CommonLoggingTarget Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


CommonLoggingTarget Constructor

Creates this target using the default layout.

Overload List

Creates this target using the default layout.

public CommonLoggingTarget()

Creates this target using a custom layout.

public CommonLoggingTarget(string)

See Also

CommonLoggingTarget Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


CommonLoggingTarget Constructor

Creates this target using the default layout.

[Visual Basic]
Public Overloads Sub New()
[C#]
CommonLoggingTarget();

See Also

CommonLoggingTarget Class | Common.Logging.NLog Namespace | CommonLoggingTarget Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


CommonLoggingTarget Constructor

Creates this target using a custom layout.

[Visual Basic]
Public Overloads Sub New( _
ByVal layout As String _
)
[C#]
CommonLoggingTarget(
string layout
);

See Also

CommonLoggingTarget Class | Common.Logging.NLog Namespace | CommonLoggingTarget Constructor Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


CommonLoggingTarget Methods

The methods of the CommonLoggingTarget class are listed below. For a complete list of CommonLoggingTarget class members, see the CommonLoggingTarget Members topic.

Public Instance Methods

Equals (inherited from Object) |
Flush (inherited from NLog.Target) | Overloaded.
GetHashCode (inherited from Object) |
GetLayouts (inherited from NLog.Target) |
GetType (inherited from Object) |
Initialize (inherited from NLog.TargetWithLayout) |
PopulateLayouts (inherited from NLog.TargetWithLayout) |
PrecalculateVolatileLayouts (inherited from NLog.Target) |
ToString (inherited from NLog.Target) |

Protected Instance Methods

Close (inherited from NLog.Target) |
Finalize (inherited from Object) |
InvalidateLayouts (inherited from NLog.Target) |
MemberwiseClone (inherited from Object) |
NeedsStackTrace (inherited from NLog.Target) |
Write | Overloaded. Writes the event to the Common.Logging infrastructure
Write (inherited from NLog.Target) | Overloaded.

See Also

CommonLoggingTarget Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


Write Method

Common Logging 2.0 API Reference

CommonLoggingTarget.Write Method

Writes the event to the Common.Logging infrastructure

Overload List

Writes the event to the Common.Logging infrastructure

protected override void Write(LogEventInfo)

Inherited from Target.

protected virtual void Write(LogEventInfo[])

See Also

CommonLoggingTarget Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


CommonLoggingTarget.Write(LogEventInfo) Method

Writes the event to the Common.Logging infrastructure

[Visual Basic]
Protected Overrides Overloads Sub Write( _
ByVal logEvent As LogEventInfo _
)
[C#]
protected override void Write(
LogEventInfo logEvent
);

See Also

CommonLoggingTarget Class | Common.Logging.NLog Namespace | CommonLoggingTarget.Write Overload List

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


NLogLogger Class

Concrete implementation of ILog interface specific to NLog 1.0.0.505.

For a list of all members of this type, see NLogLogger Members .

System.Object
AbstractLogger
NLogLogger

[Visual Basic]
Public Class NLogLogger
Inherits AbstractLogger
[C#]
public class NLogLogger : AbstractLogger

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

NLog is a .NET logging library designed with simplicity and flexibility in mind. http://www.nlog-project.org/

Requirements

Namespace: Common.Logging.NLog

Assembly: Common.Logging.NLog (in Common.Logging.NLog.dll)

See Also

NLogLogger Members | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


NLogLogger Members

NLogLogger overview

Public Instance Properties

IsDebugEnabled | Gets a value indicating whether this instance is debug enabled.
IsErrorEnabled | Gets a value indicating whether this instance is error enabled.
IsFatalEnabled | Gets a value indicating whether this instance is fatal enabled.
IsInfoEnabled | Gets a value indicating whether this instance is info enabled.
IsTraceEnabled | Gets a value indicating whether this instance is trace enabled.
IsWarnEnabled | Gets a value indicating whether this instance is warn enabled.

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Constructors

NLogLogger Constructor Constructor

Protected Instance Methods

Finalize (inherited from Object) |
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
MemberwiseClone (inherited from Object) |
WriteInternal | Actually sends the message to the underlying log system.

See Also

NLogLogger Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


NLogLogger Constructor

Constructor

[Visual Basic]
Protected Sub New( _
ByVal logger As Logger _
)
[C#]
NLogLogger(
Logger logger
);

See Also

NLogLogger Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


NLogLogger Properties

The properties of the NLogLogger class are listed below. For a complete list of NLogLogger class members, see the NLogLogger Members topic.

Public Instance Properties

IsDebugEnabled | Gets a value indicating whether this instance is debug enabled.
IsErrorEnabled | Gets a value indicating whether this instance is error enabled.
IsFatalEnabled | Gets a value indicating whether this instance is fatal enabled.
IsInfoEnabled | Gets a value indicating whether this instance is info enabled.
IsTraceEnabled | Gets a value indicating whether this instance is trace enabled.
IsWarnEnabled | Gets a value indicating whether this instance is warn enabled.

See Also

NLogLogger Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


IsDebugEnabled Property

Common Logging 2.0 API Reference

NLogLogger.IsDebugEnabled Property

Gets a value indicating whether this instance is debug enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsDebugEnabled() As Boolean _
Implements ILog.IsDebugEnabled

Public Get
End Get
End Property
[C#]
public override bool IsDebugEnabled { public get; }

Property Value

true if this instance is debug enabled; otherwise, false.

Implements

ILog.IsDebugEnabled

See Also

NLogLogger Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


IsErrorEnabled Property

Common Logging 2.0 API Reference

NLogLogger.IsErrorEnabled Property

Gets a value indicating whether this instance is error enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsErrorEnabled() As Boolean _
Implements ILog.IsErrorEnabled

Public Get
End Get
End Property
[C#]
public override bool IsErrorEnabled { public get; }

Property Value

true if this instance is error enabled; otherwise, false.

Implements

ILog.IsErrorEnabled

See Also

NLogLogger Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


IsFatalEnabled Property

Common Logging 2.0 API Reference

NLogLogger.IsFatalEnabled Property

Gets a value indicating whether this instance is fatal enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsFatalEnabled() As Boolean _
Implements ILog.IsFatalEnabled

Public Get
End Get
End Property
[C#]
public override bool IsFatalEnabled { public get; }

Property Value

true if this instance is fatal enabled; otherwise, false.

Implements

ILog.IsFatalEnabled

See Also

NLogLogger Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


IsInfoEnabled Property

Common Logging 2.0 API Reference

NLogLogger.IsInfoEnabled Property

Gets a value indicating whether this instance is info enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsInfoEnabled() As Boolean _
Implements ILog.IsInfoEnabled

Public Get
End Get
End Property
[C#]
public override bool IsInfoEnabled { public get; }

Property Value

true if this instance is info enabled; otherwise, false.

Implements

ILog.IsInfoEnabled

See Also

NLogLogger Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


IsTraceEnabled Property

Common Logging 2.0 API Reference

NLogLogger.IsTraceEnabled Property

Gets a value indicating whether this instance is trace enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsTraceEnabled() As Boolean _
Implements ILog.IsTraceEnabled

Public Get
End Get
End Property
[C#]
public override bool IsTraceEnabled { public get; }

Property Value

true if this instance is trace enabled; otherwise, false.

Implements

ILog.IsTraceEnabled

See Also

NLogLogger Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


IsWarnEnabled Property

Common Logging 2.0 API Reference

NLogLogger.IsWarnEnabled Property

Gets a value indicating whether this instance is warn enabled.

[Visual Basic]
Public Overrides ReadOnly Property IsWarnEnabled() As Boolean _
Implements ILog.IsWarnEnabled

Public Get
End Get
End Property
[C#]
public override bool IsWarnEnabled { public get; }

Property Value

true if this instance is warn enabled; otherwise, false.

Implements

ILog.IsWarnEnabled

See Also

NLogLogger Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


NLogLogger Methods

The methods of the NLogLogger class are listed below. For a complete list of NLogLogger class members, see the NLogLogger Members topic.

Public Instance Methods

Debug (inherited from AbstractLogger) | Overloaded. Log a message object with the Debug level.
DebugFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Debug level.
Equals (inherited from Object) |
Error (inherited from AbstractLogger) | Overloaded. Log a message object with the Error level.
ErrorFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Error level.
Fatal (inherited from AbstractLogger) | Overloaded. Log a message object with the Fatal level.
FatalFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Fatal level.
GetHashCode (inherited from Object) |
GetType (inherited from Object) |
Info (inherited from AbstractLogger) | Overloaded. Log a message object with the Info level.
InfoFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Info level.
ToString (inherited from Object) |
Trace (inherited from AbstractLogger) | Overloaded. Log a message object with the Trace level.
TraceFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Trace level.
Warn (inherited from AbstractLogger) | Overloaded. Log a message object with the Warn level.
WarnFormat (inherited from AbstractLogger) | Overloaded. Log a message with the Warn level.

Protected Instance Methods

Finalize (inherited from Object) |
GetWriteHandler (inherited from AbstractLogger) | Override this method to use a different method than WriteInternal for writing log events to the underlying log system.
MemberwiseClone (inherited from Object) |
WriteInternal | Actually sends the message to the underlying log system.

See Also

NLogLogger Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


NLogLogger.WriteInternal Method

Actually sends the message to the underlying log system.

[Visual Basic]
Protected Overrides Sub WriteInternal( _
ByVal logLevel As LogLevel, _
ByVal message As Object, _
ByVal exception As Exception _
)
[C#]
protected override void WriteInternal(
LogLevel logLevel,
object message,
Exception exception
);

Parameters

logLevel
the level of this log event.
message
the message to log
exception
the exception to log (may be null)

See Also

NLogLogger Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


NLogLoggerFactoryAdapter Class

Concrete subclass of ILoggerFactoryAdapter specific to NLog 1.0.0.505.

For a list of all members of this type, see NLogLoggerFactoryAdapter Members .

System.Object
AbstractCachingLoggerFactoryAdapter
NLogLoggerFactoryAdapter

[Visual Basic]
Public Class NLogLoggerFactoryAdapter
Inherits AbstractCachingLoggerFactoryAdapter
[C#]
public class NLogLoggerFactoryAdapter : AbstractCachingLoggerFactoryAdapter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The following configuration property values may be configured:

  • configType: INLINE|FILE
  • configFile: NLog XML configuration file path in case of FILE
The configType values have the following implications:
  • FILE: calls NLog.LogManager.Configuration = new NLog.Config.XmlLoggingConfiguration(configFile).
  • <any other value>: expects NLog to be configured externally

Example

The following snippet shows how to configure EntLib logging for Common.Logging:

<configuration>
  <configSections>
      <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
  </configSections>
  <common>
    <logging>
      <factoryAdapter type="Common.Logging.NLog.NLogLoggerFactoryAdapter, Common.Logging.NLog">
        <arg key="configType" value="FILE" />
        <arg key="configFile" value="~/nlog.config" />
      </factoryAdapter>
    </logging>
  </common>
</configuration>

Requirements

Namespace: Common.Logging.NLog

Assembly: Common.Logging.NLog (in Common.Logging.NLog.dll)

See Also

NLogLoggerFactoryAdapter Members | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


NLogLoggerFactoryAdapter Members

NLogLoggerFactoryAdapter overview

Public Instance Constructors

NLogLoggerFactoryAdapter Constructor Constructor

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Get a ILog instance by type name
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

NLogLoggerFactoryAdapter Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


NLogLoggerFactoryAdapter Constructor

Constructor

[Visual Basic]
Public Sub New( _
ByVal properties As NameValueCollection _
)
[C#]
NLogLoggerFactoryAdapter(
NameValueCollection properties
);

Parameters

properties

See Also

NLogLoggerFactoryAdapter Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


NLogLoggerFactoryAdapter Methods

The methods of the NLogLoggerFactoryAdapter class are listed below. For a complete list of NLogLoggerFactoryAdapter class members, see the NLogLoggerFactoryAdapter Members topic.

Public Instance Methods

Equals (inherited from Object) |
GetHashCode (inherited from Object) |
GetLogger (inherited from AbstractCachingLoggerFactoryAdapter) | Overloaded. Get a ILog instance by Type.
GetType (inherited from Object) |
ToString (inherited from Object) |

Protected Instance Methods

ClearLoggerCache (inherited from AbstractCachingLoggerFactoryAdapter) | Purges all loggers from cache
CreateLogger | Get a ILog instance by type name
Finalize (inherited from Object) |
MemberwiseClone (inherited from Object) |

See Also

NLogLoggerFactoryAdapter Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


NLogLoggerFactoryAdapter.CreateLogger Method

Get a ILog instance by type name

[Visual Basic]
Protected Overrides Sub CreateLogger( _
ByVal name As String _
)
[C#]
protected override ILog CreateLogger(
string name
);

Parameters

name

Return Value

See Also

NLogLoggerFactoryAdapter Class | Common.Logging.NLog Namespace

Send comments on this topic.

© The Common Infrastructure Libraries for .NET Team 2009 All Rights Reserved.

Generated from assembly Common.Logging.NLog [2.0.0.3403] by NDoc3


Common.Logging.EntLibHierarchy

Common Logging 2.0 API Reference

Common.Logging.EntLib Hierarchy

Object
EntLibLoggerSettings
EntLibLoggerSettings
AbstractCachingLoggerFactoryAdapter ---- ILoggerFactoryAdapter
EntLibLoggerFactoryAdapter
EntLibLoggerFactoryAdapter
AbstractLogger ---- ILog
EntLibLogger
EntLibLogger
TraceListenerAsssembler ---- IAssembler(TObject,TConfiguration)
CommonLoggingEntlibTraceListenerAssembler
CommonLoggingEntlibTraceListenerAssembler
LogFilter ---- ILogFilter
SeverityFilter
SeverityFilter
ConfigurationElement
NamedConfigurationElement ---- IObjectWithName
NameTypeConfigurationElement ---- IObjectWithNameAndType
TraceListenerData
CommonLoggingEntlibTraceListenerData
CommonLoggingEntlibTraceListenerData
MarshalByRefObject
TraceListener ---- IDisposable
FormattedTraceListenerBase ---- IInstrumentationEventProvider
CommonLoggingEntlibTraceListener
CommonLoggingEntlibTraceListener

See Also

Common.Logging.EntLib Namespace


Common.Logging.Log4NetHierarchy

Common Logging 2.0 API Reference

Common.Logging.Log4Net Hierarchy

Object
AbstractCachingLoggerFactoryAdapter ---- ILoggerFactoryAdapter
Log4NetLoggerFactoryAdapter
Log4NetLoggerFactoryAdapter
AbstractLogger ---- ILog
Log4NetLogger
Log4NetLogger
Log4NetLoggerFactoryAdapter.ILog4NetRuntime
Log4NetLoggerFactoryAdapter.ILog4NetRuntime
AppenderSkeleton ---- IAppender, IBulkAppender, IOptionHandler
CommonLoggingAppender
CommonLoggingAppender

See Also

Common.Logging.Log4Net Namespace


Common.Logging.NLogHierarchy

Common Logging 2.0 API Reference

Common.Logging.NLog Hierarchy

Object
AbstractCachingLoggerFactoryAdapter ---- ILoggerFactoryAdapter
NLogLoggerFactoryAdapter
AbstractLogger ---- ILog
NLogLogger
Target
TargetWithLayout
CommonLoggingTarget

See Also

Common.Logging.NLog Namespace


Common.Logging.ConfigurationHierarchy

Common Logging 2.0 API Reference

Common.Logging.Configuration Hierarchy

Object
ArgUtils
DefaultConfigurationReader ---- IConfigurationReader
LogSetting
Delegate ---- ICloneable, ISerializable
MulticastDelegate
ArgUtils.Action
ArgUtils.Function(T)
ArgUtils.ParseHandler(T)

See Also

Common.Logging.Configuration Namespace


AbstractCachingLoggerFactoryAdapter Hierarchy

System.Object
AbstractCachingLoggerFactoryAdapter
EntLibLoggerFactoryAdapter
EntLibLoggerFactoryAdapter
Log4NetLoggerFactoryAdapter
Log4NetLoggerFactoryAdapter
NLogLoggerFactoryAdapter
AbstractSimpleLoggerFactoryAdapter

See Also

AbstractCachingLoggerFactoryAdapter Class | AbstractCachingLoggerFactoryAdapter Members | Common.Logging.Factory Namespace


AbstractLogger Hierarchy

System.Object
AbstractLogger
EntLibLogger
EntLibLogger
Log4NetLogger
Log4NetLogger
NLogLogger
AbstractSimpleLogger

See Also

AbstractLogger Class | AbstractLogger Members | Common.Logging.Factory Namespace


Common.Logging.FactoryHierarchy

Common Logging 2.0 API Reference

Common.Logging.Factory Hierarchy

Object
AbstractCachingLoggerFactoryAdapter ---- ILoggerFactoryAdapter
AbstractLogger ---- ILog
Delegate ---- ICloneable, ISerializable
MulticastDelegate
AbstractLogger.WriteHandler

See Also

Common.Logging.Factory Namespace


Common.Logging.SimpleHierarchy

Common Logging 2.0 API Reference

Common.Logging.Simple Hierarchy

Object
AbstractCachingLoggerFactoryAdapter ---- ILoggerFactoryAdapter
AbstractSimpleLoggerFactoryAdapter
ConsoleOutLoggerFactoryAdapter
TraceLoggerFactoryAdapter
AbstractLogger ---- ILog
AbstractSimpleLogger
CapturingLogger
ConsoleOutLogger
TraceLogger ---- IDeserializationCallback
CapturingLoggerEvent
CapturingLoggerFactoryAdapter ---- ILoggerFactoryAdapter
NoOpLogger ---- ILog
NoOpLoggerFactoryAdapter ---- ILoggerFactoryAdapter
MarshalByRefObject
TraceListener ---- IDisposable
CommonLoggingTraceListener

See Also

Common.Logging.Simple Namespace


Common.LoggingHierarchy

Common Logging 2.0 API Reference

Common.Logging Hierarchy

Object
ConfigurationSectionHandler ---- IConfigurationSectionHandler
IConfigurationReader
ILog
ILoggerFactoryAdapter
LogManager
Delegate ---- ICloneable, ISerializable
MulticastDelegate
FormatMessageHandler
Exception ---- ISerializable
ApplicationException
ConfigurationException
ValueType
Enum ---- IComparable, IConvertible, IFormattable
LogLevel

See Also

Common.Logging Namespace