C# Class Microsoft.Azure.Commands.RecoveryServices.Backup.Logger

Utility for logging. Uses PS logging underneath. Plan to add more functionality in the upcoming releases.
Show file Open project: Azure/azure-powershell

Public Methods

Method Description
Logger ( Action writeWarning, Action writeDebug, Action writeVerbose, Action throwTerminatingError ) : System

Constructor. Takes the delegates for the various logging operations as input.

ThrowTerminatingError ( ErrorRecord errorRecord ) : void

Throws a terminating error.

WriteDebug ( string text ) : void

Writes debug message.

WriteVerbose ( string text ) : void

Writes verbose message.

WriteWarning ( string text ) : void

Writes warning message.

Method Details

Logger() public method

Constructor. Takes the delegates for the various logging operations as input.
public Logger ( Action writeWarning, Action writeDebug, Action writeVerbose, Action throwTerminatingError ) : System
writeWarning Action Delegate to write warnings
writeDebug Action Delegate to write debug messages
writeVerbose Action Delegate to write verbose messages
throwTerminatingError Action Delegate to throw terminating errors
return System

ThrowTerminatingError() public method

Throws a terminating error.
public ThrowTerminatingError ( ErrorRecord errorRecord ) : void
errorRecord System.Management.Automation.ErrorRecord
return void

WriteDebug() public method

Writes debug message.
public WriteDebug ( string text ) : void
text string
return void

WriteVerbose() public method

Writes verbose message.
public WriteVerbose ( string text ) : void
text string
return void

WriteWarning() public method

Writes warning message.
public WriteWarning ( string text ) : void
text string
return void