每当我在一个方法中调用我的记录器时,例如
_logger.Debug("Connecting to database...");
我收到警告:
CA1303 : Microsoft.Globalization:
Method 'Database.Connect()' passes a literal
string as parameter 'message' of a call to 'ILogger.Debug(string)'.
Retrieve the following string(s) from a resource table instead:
"Connecting to database...".
每次我使用 的功能时,有没有办法抑制此警告ILogger?我真的不想在我使用它的每种方法中压制它。