File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
dotnet/src/dotnetframework/GxClasses/Helpers Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -185,11 +185,13 @@ internal class GXLoggerLog4Net : IGXLogger
185185 const string ThreadNameNet6 = ".NET ThreadPool Worker" ;
186186 const string ThreadId = "threadid" ;
187187#endif
188+ private bool _traceEnabled = false ;
188189 internal ILog log { get ; set ; }
189190
190191 internal GXLoggerLog4Net ( ILog logInstance )
191192 {
192193 log = logInstance ;
194+ _traceEnabled = log . Logger . IsEnabledFor ( Level . Trace ) ;
193195 }
194196 void SetThreadIdForLogging ( )
195197 {
@@ -224,7 +226,7 @@ void SetThreadIdForLogging()
224226 public bool IsCriticalEnabled { get => CriticalEnabled ( ) ; }
225227 public bool TraceEnabled ( )
226228 {
227- return log . Logger . IsEnabledFor ( Level . Trace ) ;
229+ return _traceEnabled ;
228230 }
229231 public bool ErrorEnabled ( )
230232 {
You can’t perform that action at this time.
0 commit comments