API Reference
InternalLogger
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
- If set to true, verbose messages will be logged.
Methods
public Void WriteDebug(String message, params Object[] args) #VoidWrites a debug message to the console and invokes the OnDebugMessage event.
Parameters
- message System.String
- The debug message to be logged.
- args System.Object[]
- An array of objects to write using format.
public Void WriteError(String message) #VoidWrites an error message to the console and invokes the OnErrorMessage event.
Parameters
- message System.String
- The error message to be logged.
public Void WriteError(String message, params Object[] args) #VoidWrites a formatted error message to the console and invokes the OnErrorMessage event.
Parameters
- message System.String
- The error message to be logged, with format items.
- args System.Object[]
- An array of objects to write using format.
public Void WriteInformation(String message, params Object[] args) #VoidWrites an information message to the console and invokes the OnInformationMessage event.
Parameters
- message System.String
- The information message to be logged.
- args System.Object[]
- 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) #VoidWrites a progress message to the console and invokes the OnProgressMessage event.
Parameters
- activity System.String
- The activity being logged.
- currentOperation System.String
- The current operation being logged.
- percentCompleted System.Int32
- The percentage of the operation that is completed.
- currentSteps System.Nullable{System.Int32} = null
- The current step of the operation (optional).
- totalSteps System.Nullable{System.Int32} = null
- The total steps of the operation (optional).
public Void WriteVerbose(String message) #VoidWrites a verbose message to the console and invokes the OnVerboseMessage event.
Parameters
- message System.String
- The verbose message to be logged.
public Void WriteVerbose(String message, params Object[] args) #VoidWrites a formatted verbose message to the console and invokes the OnVerboseMessage event.
Parameters
- message System.String
- The verbose message to be logged, with format items.
- args System.Object[]
- An array of objects to write using format.
public Void WriteWarning(String message) #VoidWrites a warning message to the console and invokes the OnWarningMessage event.
Parameters
- message System.String
- The warning message to be logged.
public Void WriteWarning(String message, params Object[] args) #VoidWrites a formatted warning message to the console and invokes the OnWarningMessage event.
Parameters
- message System.String
- The warning message to be logged, with format items.
- args System.Object[]
- An array of objects to write using format.
Inherited Methods
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.