mirror of
https://github.com/farcasclaudiu/LanBackup.git
synced 2026-06-27 01:00:28 +03:00
status with colored box
minor fixes
This commit is contained in:
@@ -7,19 +7,36 @@ namespace LanBackup.WebApp.Models.Telemetry
|
||||
{
|
||||
private TelemetryClient _telemetryClient;
|
||||
|
||||
private bool isEnabled;
|
||||
public bool IsEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return isEnabled;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
isEnabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
public TelemetryLogger(TelemetryClient telemetryClient)
|
||||
{
|
||||
this._telemetryClient = telemetryClient;
|
||||
this.IsEnabled = telemetryClient.IsEnabled();
|
||||
}
|
||||
|
||||
public void TrackEvent(string eventmsg)
|
||||
{
|
||||
this._telemetryClient.TrackEvent(eventmsg);
|
||||
if(this.IsEnabled)
|
||||
this._telemetryClient.TrackEvent(eventmsg);
|
||||
}
|
||||
|
||||
public void TrackException(Exception ex)
|
||||
{
|
||||
this._telemetryClient.TrackException(ex);
|
||||
if(this.IsEnabled)
|
||||
this._telemetryClient.TrackException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user