Skip to content

Commit 98f2aeb

Browse files
committed
Tweaked loglevels when successfully sending data to EDDN
1 parent 528b131 commit 98f2aeb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

EDDN/EliteAPI.EDDN/EliteDangerousApiEddnBridge.cs

+5-4
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,13 @@ private async Task SendData(string json)
115115
_ => response.ReasonPhrase
116116
};
117117

118+
var responseContent = await response.Content.ReadAsStringAsync();
119+
118120
if (!response.IsSuccessStatusCode)
119-
_log.LogWarning("Failed to send data to EDDN. Status code: {StatusCode} ({Message})", response.StatusCode.ToString(), message);
121+
_log.LogWarning("Failed to send data to EDDN. Status code: {StatusCode} ({Message}) ({Response})",
122+
response.StatusCode.ToString(), message, responseContent);
120123
else
121-
_log.LogInformation("Data sent to EDDN successfully!");
122-
123-
_log.LogInformation(await response.Content.ReadAsStringAsync());
124+
_log.LogDebug("Data sent to EDDN successfully! {Response}", responseContent);
124125
}
125126

126127
private bool IsValidEvent(IEvent e, EventContext c)

0 commit comments

Comments
 (0)