@@ -6,11 +6,11 @@ namespace GitVersion.Infrastructure;
66public class LoggingEnricher : ILogEventEnricher
77{
88 public static readonly LoggingLevelSwitch LogLevel = new ( ) ;
9- private string ? _cachedLogFilePath ;
10- private LogEventProperty ? _cachedLogFilePathProp ;
9+ private string ? cachedLogFilePath ;
10+ private LogEventProperty ? cachedLogFilePathProp ;
1111
1212 // this path and level will be set by the LogInterceptor.cs after parsing the settings
13- private static string _path = string . Empty ;
13+ private static string path = string . Empty ;
1414
1515 public const string LogFilePathPropertyName = "LogFilePath" ;
1616
@@ -20,25 +20,25 @@ public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propFactory)
2020 // we won't have the setting, so a default value for the log file will be required
2121 LogEventProperty logFilePathProp ;
2222
23- if ( _cachedLogFilePathProp != null && _path . Equals ( _cachedLogFilePath ) )
23+ if ( this . cachedLogFilePathProp != null && path . Equals ( this . cachedLogFilePath ) )
2424 {
2525 // The Path hasn't changed, so let's use the cached property
26- logFilePathProp = _cachedLogFilePathProp ;
26+ logFilePathProp = this . cachedLogFilePathProp ;
2727 }
2828 else
2929 {
3030 // We've got a new path for the log. Let's create a new property
3131 // and cache it for future log events to use
32- _cachedLogFilePath = _path ;
33- _cachedLogFilePathProp = logFilePathProp = propFactory . CreateProperty ( LogFilePathPropertyName , _path ) ;
32+ this . cachedLogFilePath = path ;
33+ this . cachedLogFilePathProp = logFilePathProp = propFactory . CreateProperty ( LogFilePathPropertyName , path ) ;
3434 }
3535
3636 logEvent . AddPropertyIfAbsent ( logFilePathProp ) ;
3737 }
3838
3939 public static void Configure ( string ? logFile , Verbosity verbosity )
4040 {
41- if ( ! string . IsNullOrWhiteSpace ( logFile ) ) _path = logFile ;
41+ if ( ! string . IsNullOrWhiteSpace ( logFile ) ) path = logFile ;
4242 LogLevel . MinimumLevel = GetLevelForVerbosity ( verbosity ) ;
4343 }
4444
0 commit comments