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
We can clearly know the class that writes the log through the following syntax generated by Anotar.
static ILogger logger = Log.ForContext();
Also know LineNumber through Anotar's elegant feature.
Therefore, since Class and LineNumber are recorded accurately, there is no confusion about which method logs the log due to method overloading.
Given these circumstances, it can sometimes feel superfluous to log the full specification of a Method.
This becomes even worse when there are many parameters of the method.
Describe the solution
So my proposal is that it would be useful to be able to change the behavior like below via [assembly: LogMinimalMethodName] option.
Wherever it is configured, I think all would be good.
Just because Anotar already has a configuration method that starts with '[assembly:' as shown below, I thought that a similar implementation would be simpler.
Is the proposal related to a problem
We can clearly know the class that writes the log through the following syntax generated by Anotar.
static ILogger logger = Log.ForContext();
Also know LineNumber through Anotar's elegant feature.
Therefore, since Class and LineNumber are recorded accurately, there is no confusion about which method logs the log due to method overloading.
Given these circumstances, it can sometimes feel superfluous to log the full specification of a Method.
This becomes even worse when there are many parameters of the method.
Describe the solution
So my proposal is that it would be useful to be able to change the behavior like below via [assembly: LogMinimalMethodName] option.
In NLog
In Serilog
In NLog
In Serilog
The text was updated successfully, but these errors were encountered: