Log error and notices when necessary

This commit is contained in:
Andrew Welker
2020-07-08 12:06:40 -06:00
parent e8d42b701e
commit 38d6200409
2 changed files with 15 additions and 3 deletions

View File

@@ -74,10 +74,16 @@ namespace PepperDash.Essentials.Bridges
}
}
Debug.Console(1, this, "Devices Linked.");
var registerResult = Eisc.Register();
Debug.Console(2, this, Debug.ErrorLogLevel.Notice, "Registration result: {0}", registerResult);
if (registerResult != eDeviceRegistrationUnRegistrationResponse.Success)
{
Debug.Console(2, this, Debug.ErrorLogLevel.Error, "Registration result: {0}", registerResult);
return;
}
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "EISC registration successful");
});
}

View File

@@ -122,7 +122,13 @@ namespace PepperDash.Essentials.Core.Bridges
var registerResult = Eisc.Register();
Debug.Console(2, this, Debug.ErrorLogLevel.Notice, "Registration result: {0}", registerResult);
if (registerResult != eDeviceRegistrationUnRegistrationResponse.Success)
{
Debug.Console(2, this, Debug.ErrorLogLevel.Error, "Registration result: {0}", registerResult);
return;
}
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "EISC registration successful");
});
}