File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
src/MySqlConnector.Logging.Serilog Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
- using System ;
1
+ using System ;
2
2
using System . Text . RegularExpressions ;
3
3
using Serilog ;
4
4
using Serilog . Events ;
@@ -7,20 +7,19 @@ namespace MySqlConnector.Logging
7
7
{
8
8
public sealed class SerilogLoggerProvider : IMySqlConnectorLoggerProvider
9
9
{
10
- public SerilogLoggerProvider ( bool attemptProperties ) => m_attemptProperties = attemptProperties ;
10
+ public SerilogLoggerProvider ( ) { }
11
11
12
12
public IMySqlConnectorLogger CreateLogger ( string name )
13
13
{
14
- return new SerilogLogger ( name , m_attemptProperties ) ;
14
+ return new SerilogLogger ( name ) ;
15
15
}
16
16
17
17
private class SerilogLogger : IMySqlConnectorLogger
18
18
{
19
- public SerilogLogger ( string name , bool attemptProperties )
19
+ public SerilogLogger ( string name )
20
20
{
21
21
m_name = name ;
22
22
m_logger = Serilog . Log . ForContext ( "SourceContext" , "MySqlConnector." + name ) ;
23
- m_attemptProperties = attemptProperties ;
24
23
}
25
24
26
25
public bool IsEnabled ( MySqlConnectorLogLevel level ) => m_logger . IsEnabled ( GetLevel ( level ) ) ;
@@ -61,10 +60,8 @@ private static LogEventLevel GetLevel(MySqlConnectorLogLevel level)
61
60
static readonly Regex tokenReplacer = new Regex ( @"\{(\d+)\}" , RegexOptions . Compiled ) ;
62
61
63
62
readonly ILogger m_logger ;
64
- readonly bool m_attemptProperties ;
65
63
readonly string m_name ;
66
64
}
67
65
68
- readonly bool m_attemptProperties ;
69
66
}
70
67
}
You can’t perform that action at this time.
0 commit comments