This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -119,11 +119,13 @@ public IRedisPubSubServer Start()
119119 Name = "RedisPubSubServer " + Interlocked . Increment ( ref bgThreadCount )
120120 } ;
121121 bgThread . Start ( ) ;
122- Log . Debug ( "Started Background Thread: " + bgThread . Name ) ;
122+ if ( Log . IsDebugEnabled )
123+ Log . Debug ( "Started Background Thread: " + bgThread . Name ) ;
123124 }
124125 else
125126 {
126- Log . Debug ( "Retrying RunLoop() on Thread: " + bgThread . Name ) ;
127+ if ( Log . IsDebugEnabled )
128+ Log . Debug ( "Retrying RunLoop() on Thread: " + bgThread . Name ) ;
127129 RunLoop ( ) ;
128130 }
129131 }
@@ -347,7 +349,8 @@ private void Stop(bool shouldRestart)
347349
348350 if ( Interlocked . CompareExchange ( ref status , Status . Stopping , Status . Started ) == Status . Started )
349351 {
350- Log . Debug ( "Stopping RedisPubSubServer..." ) ;
352+ if ( Log . IsDebugEnabled )
353+ Log . Debug ( "Stopping RedisPubSubServer..." ) ;
351354
352355 //Unblock current bgthread by issuing StopCommand
353356 SendControlCommand ( Operation . Stop ) ;
@@ -417,7 +420,8 @@ private void HandleFailover(IRedisClientsManager clientsManager)
417420
418421 void HandleUnSubscribe ( string channel )
419422 {
420- Log . Debug ( "OnUnSubscribe: " + channel ) ;
423+ if ( Log . IsDebugEnabled )
424+ Log . Debug ( "OnUnSubscribe: " + channel ) ;
421425
422426 if ( OnUnSubscribe != null )
423427 OnUnSubscribe ( channel ) ;
You can’t perform that action at this time.
0 commit comments