File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ the existing logging framework, and install it by setting `MySqlConnector.Loggin
16
16
17
17
The ` MySqlConnectorLogManager.Provider ` property may only be set once, and must be set before any other MySqlConnector library methods are called.
18
18
19
+ Debug-level logging is useful for diagnosing problems with MySqlConnector itself; it is recommend that applications limit MySqlConnector
20
+ logging to Info or higher.
21
+
19
22
### Existing Logging Providers
20
23
21
24
There are NuGet packages that adapt MySqlConnector logging for popular logging frameworks.
@@ -30,6 +33,16 @@ Add the following line of code to your application startup routine:
30
33
MySqlConnectorLogManager .Provider = new Log4netLoggerProvider ();
31
34
```
32
35
36
+ To reduce the verbosity of MySqlConnector logging, add the following element to your log4net config:
37
+
38
+ ``` xml
39
+ <log4net >
40
+ ...
41
+ <logger name =" MySqlConnector" >
42
+ <level value =" WARN" /> <!-- or "INFO" -->
43
+ </logger >
44
+ ```
45
+
33
46
#### Microsoft.Extensions.Logging
34
47
35
48
Install [ MySqlConnector.Logging.Microsoft.Extensions.Logging] ( https://www.nuget.org/packages/MySqlConnector.Logging.Microsoft.Extensions.Logging/ ) .
You can’t perform that action at this time.
0 commit comments