C# Class GoogleCloudExtension.Utils.ActivityLogUtils

This utility class implements helpers to log to the activity log, which will help debug issues with the extension that only our customers can reproduce. The log is only written to if the /log parameter is passed to Visual Studio on startup, other than that writing to the log is a noop.
Afficher le fichier Open project: GoogleCloudPlatform/google-cloud-visualstudio Class Usage Examples

Méthodes publiques

Méthode Description
Initialize ( IServiceProvider serviceProvider ) : void

Initialize the helper, most importantly provides the service provider to use to get to the log service.

LogError ( string entry ) : void

Logs an error entry into the log.

LogInfo ( string entry ) : void

Logs a information entry into the log.

Private Methods

Méthode Description
GetActivityLog ( ) : IVsActivityLog

This method retrieves the activity log service, as per the documentation a new interface must be fetched everytime it is needed, which is why not caching is performed. See https://msdn.microsoft.com/en-us/library/bb166359.aspx for more details.

Method Details

Initialize() public static méthode

Initialize the helper, most importantly provides the service provider to use to get to the log service.
public static Initialize ( IServiceProvider serviceProvider ) : void
serviceProvider IServiceProvider The service provider to use to get the log service.
Résultat void

LogError() public static méthode

Logs an error entry into the log.
public static LogError ( string entry ) : void
entry string The log entry.
Résultat void

LogInfo() public static méthode

Logs a information entry into the log.
public static LogInfo ( string entry ) : void
entry string The log entry.
Résultat void