Skip to content

Commit 0b34b23

Browse files
committed
Logging fix testing
1 parent f5e16fc commit 0b34b23

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Meraki.Api/CustomNewtonsoftJsonContentSerializer.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ public CustomNewtonsoftJsonContentSerializer(MerakiClientOptions options, ILogge
5757
}
5858
catch (JsonSerializationException ex)
5959
{
60-
_logger.LogWarning(ex, "{Message}", ex.Message);
60+
_logger.LogWarning(ex, "JsonSerializationException: {Message}", ex.Message);
61+
_logger.LogWarning("JsonSerializationException occurred: {Message}", ex.Message);
6162

6263
if (_options.JsonMissingMemberResponseLogLevel != LogLevel.None)
6364
{
@@ -71,7 +72,7 @@ public CustomNewtonsoftJsonContentSerializer(MerakiClientOptions options, ILogge
7172
}
7273
catch (JsonReaderException ex)
7374
{
74-
_logger.LogWarning("{Message} - Invalid JSON: {Json}", ex.Message, sourceJson);
75+
_logger.LogWarning("JsonReaderException: {Message} - Invalid JSON: {Json}", ex.Message, sourceJson);
7576
throw;
7677
}
7778
}
@@ -99,7 +100,7 @@ public CustomNewtonsoftJsonContentSerializer(MerakiClientOptions options, ILogge
99100
}
100101
catch (JsonReaderException ex)
101102
{
102-
_logger.LogWarning("{Message} - Invalid JSON: {Json}", ex.Message, sourceJson);
103+
_logger.LogWarning("JsonReaderException: {Message} - Invalid JSON: {Json}", ex.Message, sourceJson);
103104
throw;
104105
}
105106
}

0 commit comments

Comments
 (0)