TestimoX

API Reference

Class

InternalLogger

Namespace TestimoX
Assembly TestimoX

Internal logger that allows to write to console, error or wherever else is needed

Inheritance

  • Object
  • InternalLogger

Constructors

public InternalLogger(Boolean isVerbose = false) #

Initialize logger

Parameters

isVerbose System.Boolean = false optionalposition: 0

Methods

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

Writes a formatted debug message.

Parameters

message System.String requiredposition: 0
Composite format string.
args System.Object[] requiredposition: 1
Format arguments.
WriteError 3 overloads
public Void WriteError(String message) #
Returns: Void

Writes an error message.

Parameters

message System.String requiredposition: 0
Error text.
public Void WriteError(String message, params Object[] args) #
Returns: Void

Writes a formatted error message.

Parameters

message System.String requiredposition: 0
Composite format string.
args System.Object[] requiredposition: 1
Format arguments.
public Void WriteError(Exception exception, String message = null, params Object[] args) #
Returns: Void

Writes an error with an associated exception.

Parameters

exception System.Exception requiredposition: 0
Exception to include.
message System.String = null optionalposition: 1
Optional message template.
args System.Object[] requiredposition: 2
Optional template arguments.
public Void WriteInformation(String message, params Object[] args) #
Returns: Void

Writes a formatted information message.

Parameters

message System.String requiredposition: 0
Composite format string.
args System.Object[] requiredposition: 1
Format arguments.
public Void WriteProgress(String activity, String currentOperation, Int32 percentCompleted, Nullable<Int32> currentSteps = null, Nullable<Int32> totalSteps = null) #
Returns: Void

Writes a progress update and raises the OnProgressMessage event.

Parameters

activity System.String requiredposition: 0
Top-level activity label.
currentOperation System.String requiredposition: 1
Current operation/phase.
percentCompleted System.Int32 requiredposition: 2
Completion percentage.
currentSteps System.Nullable{System.Int32} = null optionalposition: 3
Optional current step of a multi-step activity.
totalSteps System.Nullable{System.Int32} = null optionalposition: 4
Optional total steps of a multi-step activity.
WriteVerbose 2 overloads
public Void WriteVerbose(String message) #
Returns: Void

Writes a verbose message.

Parameters

message System.String requiredposition: 0
Message text.
public Void WriteVerbose(String message, params Object[] args) #
Returns: Void

Writes a formatted verbose message.

Parameters

message System.String requiredposition: 0
Composite format string.
args System.Object[] requiredposition: 1
Format arguments.
WriteWarning 3 overloads
public Void WriteWarning(String message) #
Returns: Void

Writes a warning message.

Parameters

message System.String requiredposition: 0
Warning text.
public Void WriteWarning(String message, params Object[] args) #
Returns: Void

Writes a formatted warning message.

Parameters

message System.String requiredposition: 0
Composite format string.
args System.Object[] requiredposition: 1
Format arguments.
public Void WriteWarning(Exception exception, String message = null, params Object[] args) #
Returns: Void

Writes a warning with an associated exception.

Parameters

exception System.Exception requiredposition: 0
Exception to include.
message System.String = null optionalposition: 1
Optional message template.
args System.Object[] requiredposition: 2
Optional template arguments.

Properties

public Boolean IsVerbose { get; set; } #

If true, will write verbose messages to console

public Boolean IsError { get; set; } #

If true, will write error messages to console

public Boolean IsWarning { get; set; } #

If true, will write warning messages to console

public Boolean IsDebug { get; set; } #

If true, will write debug messages to console

public Boolean IsInformation { get; set; } #

If true, will write information messages to console

public Boolean IsProgress { get; set; } #

if true, will write progress messages to console

Events

public event EventHandler<LogEventArgs> OnVerboseMessage #

Define Verbose message event

public event EventHandler<LogEventArgs> OnWarningMessage #

Define Warning message event

public event EventHandler<LogEventArgs> OnErrorMessage #

Define Error message event

public event EventHandler<LogEventArgs> OnDebugMessage #

Define Debug message event

public event EventHandler<LogEventArgs> OnProgressMessage #

Define Progress message event

public event EventHandler<LogEventArgs> OnInformationMessage #

Define Information message event