Table of Contents

Class ExceptionFormatter

Namespace
Microsoft.Practices.EnterpriseLibrary.Logging
Assembly
Microsoft.Practices.EnterpriseLibrary.Logging.dll

Provides exception formatting when not using the Exception Handling Application Block.

public class ExceptionFormatter
Inheritance
ExceptionFormatter
Inherited Members

Constructors

ExceptionFormatter()

Initialize a new instance of the ExceptionFormatter class.

public ExceptionFormatter()

ExceptionFormatter(NameValueCollection, string)

Initialize a new instance of the ExceptionFormatter class with the additional information and the application name.

public ExceptionFormatter(NameValueCollection additionalInfo, string applicationName)

Parameters

additionalInfo NameValueCollection

The additional information to log.

applicationName string

The application name.

Fields

Header

Name of the additional information entry that holds the header.

public static string Header

Field Value

string

Methods

GetMessage(Exception)

Get the formatted message to be logged.

public string GetMessage(Exception exception)

Parameters

exception Exception

The exception object whose information should be written to log file.

Returns

string

The formatted message.