C# Class Skytap.Utilities.TraceLogger

Logs information using event listeners and built in System.Diagnostics.Trace functionality.
Inheritance: Logger
Afficher le fichier Open project: skytap/Skytap-TFS-Automation-Pack Class Usage Examples

Private Properties

Свойство Type Description
InitializeLogFile void

Méthodes publiques

Méthode Description
Flush ( ) : void

Write out the contents of the log string to the file, flushing the contents of the in-memory string.

Reset ( ) : void

Resets the log file by flushing the Trace, closing any files, and creating a new log filename.

This method will likely not be frequently used outside of tests, but is provided to start a new session without closing down the instance.

TraceLogger ( ) : System

Constructor for TraceLogger class.

TraceLogger ( TraceListener listener ) : System

Constructor for TraceLogger class.

This constructor allows for overriding the default type of TraceListener. This can be useful for test purposes when a log file need not be generated.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void
_LogError ( string message ) : void
_LogImportant ( string message ) : void
_LogInfo ( string message ) : void

Private Methods

Méthode Description
InitializeLogFile ( ) : void

Method Details

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

Flush() public méthode

Write out the contents of the log string to the file, flushing the contents of the in-memory string.
public Flush ( ) : void
Résultat void

Reset() public méthode

Resets the log file by flushing the Trace, closing any files, and creating a new log filename.
This method will likely not be frequently used outside of tests, but is provided to start a new session without closing down the instance.
public Reset ( ) : void
Résultat void

TraceLogger() public méthode

Constructor for TraceLogger class.
public TraceLogger ( ) : System
Résultat System

TraceLogger() public méthode

Constructor for TraceLogger class.
This constructor allows for overriding the default type of TraceListener. This can be useful for test purposes when a log file need not be generated.
public TraceLogger ( TraceListener listener ) : System
listener System.Diagnostics.TraceListener
Résultat System

_LogError() protected méthode

protected _LogError ( string message ) : void
message string
Résultat void

_LogImportant() protected méthode

protected _LogImportant ( string message ) : void
message string
Résultat void

_LogInfo() protected méthode

protected _LogInfo ( string message ) : void
message string
Résultat void