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.
Mostra file Open project: GoogleCloudPlatform/google-cloud-visualstudio Class Usage Examples

Public Methods

Method 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

Method 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 method

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.
return void

LogError() public static method

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

LogInfo() public static method

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