Skip to content

Commit

Permalink
feature: adds additional debug on level 1
Browse files Browse the repository at this point in the history
  • Loading branch information
jtalborough committed May 29, 2024
1 parent 6cc212a commit 8e67cbb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Pdu-Wattbox-Lib/WattboxHttp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void GetStatus()
var newUrl = String.Format("http://{0}/wattbox_info.xml", BaseUrl);
var newDir = String.Format("/wattbox_info.xml");

//Debug.Console(2, this, "Sending status request to {0}", newUrl);
Debug.Console(1, this, "Sending status request to {0}", newUrl);
SubmitRequest(newUrl, newDir, RequestType.Get);
}

Expand Down Expand Up @@ -119,7 +119,7 @@ public void SubmitRequest(string url, string dir, RequestType requestType)

var responseCode = response.Code;

Debug.Console(2, "{0}:{1}", url, responseCode);
Debug.Console(1, "{0}:{1}", url, responseCode);

//Any 2XX or 3XX response code is a valid HTTP response code that indicates no error
IsOnlineWattbox = (responseCode >= 200 && responseCode < 400);
Expand All @@ -133,7 +133,7 @@ public void SubmitRequest(string url, string dir, RequestType requestType)
if(string.IsNullOrEmpty(response.ContentString))
{
IsOnlineWattbox = false;
Debug.Console(2, this, "Response ContentString is null or empty");
Debug.Console(1, this, "Response ContentString is null or empty");
return;
}

Expand Down

0 comments on commit 8e67cbb

Please sign in to comment.