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
NameValueCollectionThe additional information to log.
applicationName
stringThe application name.
Fields
Header
Name of the additional information entry that holds the header.
public static string Header
Field Value
Methods
GetMessage(Exception)
Get the formatted message to be logged.
public string GetMessage(Exception exception)
Parameters
exception
ExceptionThe exception object whose information should be written to log file.
Returns
- string
The formatted message.