We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug The ConfigurationSettings.PropertyNamingStrategy does not work:
configuration .WriteTo.AzureAnalytics("...", "...", new ConfigurationSettings { LogName = "mylog", PropertyNamingStrategy = NamingStrategy.CamelCase }) .Enrich.FromLogContext();
this is because the JsonExtensions.LogPropertyName is hard coded as a constant in pascal case:
internal static class JsonExtensions { private const string LogPropertyName = "LogProperties"; ... }
So when the Flatten method is called:
internal static class JsonExtensions { internal static JObject Flatten(this JObject jsonObject, bool flatObject = true) { ... var logPropToken = jsonObject.GetValue(LogPropertyName); jsonObject.Remove(LogPropertyName); jsonObject.Add(LogPropertyName, logPropToken.ToString(Newtonsoft.Json.Formatting.None, null)); return jsonObject; } }
it will throw a NullReferenceException because "logPropToken" is null since it could not find that property.
To Reproduce Use the ConfigurationSettings.PropertyNamingStrategy set to camel case and make a log call.
Expected behavior The log should be produced with camel cased properties
Screenshots
The text was updated successfully, but these errors were encountered:
PR: #76
Sorry, something went wrong.
No branches or pull requests
Describe the bug
The ConfigurationSettings.PropertyNamingStrategy does not work:
this is because the JsonExtensions.LogPropertyName is hard coded as a constant in pascal case:
So when the Flatten method is called:
it will throw a NullReferenceException because "logPropToken" is null since it could not find that property.
To Reproduce
Use the ConfigurationSettings.PropertyNamingStrategy set to camel case and make a log call.
Expected behavior
The log should be produced with camel cased properties
Screenshots
The text was updated successfully, but these errors were encountered: