HtmlForgeX

API Reference

Class

InternalLogger

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email

Simple logging facility used internally by the library to capture verbose or warning messages. Consumers can subscribe to expose logging information to their own infrastructure.

Inheritance

  • Object
  • InternalLogger

Constructors

public InternalLogger(Boolean isVerbose = false) #

Initializes a new instance of the InternalLogger class.

Parameters

isVerbose System.Boolean = false optionalposition: 0
If set to true, verbose messages will be logged.

Methods

public Void WriteDebug(String message, params Object[] args) #
Returns: Void

Writes a debug message to the console and invokes the OnDebugMessage event.

Parameters

message System.String requiredposition: 0
The debug message to be logged.
args System.Object[] requiredposition: 1
An array of objects to write using format.
WriteError 2 overloads
public Void WriteError(String message) #
Returns: Void

Writes an error message to the console and invokes the OnErrorMessage event.

Parameters

message System.String requiredposition: 0
The error message to be logged.
public Void WriteError(String message, params Object[] args) #
Returns: Void

Writes a formatted error message to the console and invokes the OnErrorMessage event.

Parameters

message System.String requiredposition: 0
The error message to be logged, with format items.
args System.Object[] requiredposition: 1
An array of objects to write using format.
public Void WriteInformation(String message, params Object[] args) #
Returns: Void

Writes an information message to the console and invokes the OnInformationMessage event.

Parameters

message System.String requiredposition: 0
The information message to be logged.
args System.Object[] requiredposition: 1
An array of objects to write using format.
public Void WriteProgress(String activity, String currentOperation, Int32 percentCompleted, Nullable<Int32> currentSteps = null, Nullable<Int32> totalSteps = null) #
Returns: Void

Writes a progress message to the console and invokes the OnProgressMessage event.

Parameters

activity System.String requiredposition: 0
The activity being logged.
currentOperation System.String requiredposition: 1
The current operation being logged.
percentCompleted System.Int32 requiredposition: 2
The percentage of the operation that is completed.
currentSteps System.Nullable{System.Int32} = null optionalposition: 3
The current step of the operation (optional).
totalSteps System.Nullable{System.Int32} = null optionalposition: 4
The total steps of the operation (optional).
WriteVerbose 2 overloads
public Void WriteVerbose(String message) #
Returns: Void

Writes a verbose message to the console and invokes the OnVerboseMessage event.

Parameters

message System.String requiredposition: 0
The verbose message to be logged.
public Void WriteVerbose(String message, params Object[] args) #
Returns: Void

Writes a formatted verbose message to the console and invokes the OnVerboseMessage event.

Parameters

message System.String requiredposition: 0
The verbose message to be logged, with format items.
args System.Object[] requiredposition: 1
An array of objects to write using format.
WriteWarning 2 overloads
public Void WriteWarning(String message) #
Returns: Void

Writes a warning message to the console and invokes the OnWarningMessage event.

Parameters

message System.String requiredposition: 0
The warning message to be logged.
public Void WriteWarning(String message, params Object[] args) #
Returns: Void

Writes a formatted warning message to the console and invokes the OnWarningMessage event.

Parameters

message System.String requiredposition: 0
The warning message to be logged, with format items.
args System.Object[] requiredposition: 1
An array of objects to write using format.

Properties

public Boolean IsVerbose { get; set; } #

Gets or sets a value indicating whether verbose messages should be logged.

public Boolean IsError { get; set; } #

Gets or sets a value indicating whether error messages should be logged.

public Boolean IsWarning { get; set; } #

Gets or sets a value indicating whether warning messages should be logged.

public Boolean IsDebug { get; set; } #

Gets or sets a value indicating whether debug messages should be logged.

public Boolean IsInformation { get; set; } #

Gets or sets a value indicating whether information messages should be logged.

public Boolean IsProgress { get; set; } #

Gets or sets a value indicating whether progress messages should be logged.

Events

public event EventHandler<LogEventArgs> OnVerboseMessage #

Occurs when a verbose message is logged.

public event EventHandler<LogEventArgs> OnWarningMessage #

Occurs when a warning message is logged.

public event EventHandler<LogEventArgs> OnErrorMessage #

Occurs when an error message is logged.

public event EventHandler<LogEventArgs> OnDebugMessage #

Occurs when a debug message is logged.

public event EventHandler<LogEventArgs> OnProgressMessage #

Occurs when a progress message is logged.

public event EventHandler<LogEventArgs> OnInformationMessage #

Occurs when an information message is logged.