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()
119
119
Name = "RedisPubSubServer " + Interlocked . Increment ( ref bgThreadCount )
120
120
} ;
121
121
bgThread . Start ( ) ;
122
- Log . Debug ( "Started Background Thread: " + bgThread . Name ) ;
122
+ if ( Log . IsDebugEnabled )
123
+ Log . Debug ( "Started Background Thread: " + bgThread . Name ) ;
123
124
}
124
125
else
125
126
{
126
- Log . Debug ( "Retrying RunLoop() on Thread: " + bgThread . Name ) ;
127
+ if ( Log . IsDebugEnabled )
128
+ Log . Debug ( "Retrying RunLoop() on Thread: " + bgThread . Name ) ;
127
129
RunLoop ( ) ;
128
130
}
129
131
}
@@ -347,7 +349,8 @@ private void Stop(bool shouldRestart)
347
349
348
350
if ( Interlocked . CompareExchange ( ref status , Status . Stopping , Status . Started ) == Status . Started )
349
351
{
350
- Log . Debug ( "Stopping RedisPubSubServer..." ) ;
352
+ if ( Log . IsDebugEnabled )
353
+ Log . Debug ( "Stopping RedisPubSubServer..." ) ;
351
354
352
355
//Unblock current bgthread by issuing StopCommand
353
356
SendControlCommand ( Operation . Stop ) ;
@@ -417,7 +420,8 @@ private void HandleFailover(IRedisClientsManager clientsManager)
417
420
418
421
void HandleUnSubscribe ( string channel )
419
422
{
420
- Log . Debug ( "OnUnSubscribe: " + channel ) ;
423
+ if ( Log . IsDebugEnabled )
424
+ Log . Debug ( "OnUnSubscribe: " + channel ) ;
421
425
422
426
if ( OnUnSubscribe != null )
423
427
OnUnSubscribe ( channel ) ;
You can’t perform that action at this time.
0 commit comments