You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature related to a problem? Please describe.
No
Describe the requested feature
For log statements that do not require to log details of the exception prefer the *Format overloads like InfoFormat to allow logging libraries that support structured logging to extract the format template and the arguments. So instead of writing
Logger.Info($"Here is an informational log with {someValue}");
prefer
Logger.InfoFormat("Here is an informational log with {0}", someValue);
This allows semantic logger targets to easily filter on log message (Here is an informational log with {0}) and/or any of the provided arguments (0=='my value') where the first does not as that will only log strings without any context.
Describe alternatives you've considered
Given that we should move away from our current logging abstraction, investing time into such an analyzer might not be well spent but we leave it up to the people that take up this work to decide.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Describe the feature.
Is your feature related to a problem? Please describe.
No
Describe the requested feature
For log statements that do not require to log details of the exception prefer the
*Format
overloads likeInfoFormat
to allow logging libraries that support structured logging to extract the format template and the arguments. So instead of writingprefer
This allows semantic logger targets to easily filter on log message (
Here is an informational log with {0}
) and/or any of the provided arguments (0=='my value') where the first does not as that will only log strings without any context.Describe alternatives you've considered
Given that we should move away from our current logging abstraction, investing time into such an analyzer might not be well spent but we leave it up to the people that take up this work to decide.
Additional Context
No response
The text was updated successfully, but these errors were encountered: