@@ -317,7 +317,7 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory
317
317
318
318
- (NSString *)description
319
319
{
320
- return [NSString stringWithFormat: @" <MTRDeviceController : %p uuid %@ >" , self , _uniqueIdentifier];
320
+ return [NSString stringWithFormat: @" <%@ : %p uuid %@ >" , NSStringFromClass ( self . class ) , self , _uniqueIdentifier];
321
321
}
322
322
323
323
- (BOOL )isRunning
@@ -333,7 +333,7 @@ - (void)shutdown
333
333
return ;
334
334
}
335
335
336
- MTR_LOG (" Shutting down MTRDeviceController : %@" , self);
336
+ MTR_LOG (" Shutting down %@ : %@" , NSStringFromClass (self. class ) , self);
337
337
[self cleanupAfterStartup ];
338
338
}
339
339
@@ -345,7 +345,7 @@ - (void)cleanupAfterStartup
345
345
// do the secure session shutdowns. Since we don't want to hold the lock
346
346
// while calling out into arbitrary invalidation code, snapshot the list of
347
347
// devices before we start invalidating.
348
- MTR_LOG (" cleanupAfterStartup MTRDeviceController : %@" , self);
348
+ MTR_LOG (" %s : %@" , __PRETTY_FUNCTION__ , self);
349
349
os_unfair_lock_lock (self.deviceMapLock );
350
350
NSEnumerator * devices = [self .nodeIDToDeviceMap objectEnumerator ];
351
351
[self .nodeIDToDeviceMap removeAllObjects ];
@@ -363,7 +363,7 @@ - (void)cleanupAfterStartup
363
363
// in a very specific way that only MTRDeviceControllerFactory knows about.
364
364
- (void )shutDownCppController
365
365
{
366
- MTR_LOG (" shutDownCppController MTRDeviceController : %p" , self);
366
+ MTR_LOG (" %s : %p" , __PRETTY_FUNCTION__ , self);
367
367
assertChipStackLockedByCurrentThread ();
368
368
369
369
// Shut down all our endpoints.
@@ -668,7 +668,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams
668
668
});
669
669
}];
670
670
}
671
- MTR_LOG (" MTRDeviceController startup: %@" , self);
671
+ MTR_LOG (" %s: startup: %@" , __PRETTY_FUNCTION__ , self);
672
672
673
673
return YES ;
674
674
}
@@ -1020,7 +1020,7 @@ - (MTRDevice *)_setupDeviceForNodeID:(NSNumber *)nodeID prefetchedClusterData:(N
1020
1020
{
1021
1021
os_unfair_lock_assert_owner (self.deviceMapLock );
1022
1022
1023
- MTRDevice * deviceToReturn = [[MTRDevice alloc ] initWithNodeID: nodeID controller: self ];
1023
+ MTRDevice * deviceToReturn = [[MTRDevice_Concrete alloc ] initWithNodeID: nodeID controller: self ];
1024
1024
// If we're not running, don't add the device to our map. That would
1025
1025
// create a cycle that nothing would break. Just return the device,
1026
1026
// which will be in exactly the state it would be in if it were created
@@ -1183,7 +1183,7 @@ - (BOOL)addServerEndpoint:(MTRServerEndpoint *)endpoint
1183
1183
}
1184
1184
1185
1185
if (![endpoint associateWithController: self ]) {
1186
- MTR_LOG_ERROR (" %@ Failed to associate MTRServerEndpoint with MTRDeviceController " , self);
1186
+ MTR_LOG_ERROR (" %@ Failed to associate MTRServerEndpoint with %@ " , self, NSStringFromClass (self. class ) );
1187
1187
[_factory removeServerEndpoint: endpoint];
1188
1188
return NO ;
1189
1189
}
@@ -1303,7 +1303,7 @@ - (BOOL)checkIsRunning:(NSError * __autoreleasing *)error
1303
1303
return YES ;
1304
1304
}
1305
1305
1306
- MTR_LOG_ERROR (" MTRDeviceController : %@ Error: %s" , self, [kDeviceControllerErrorNotRunning UTF8String ]);
1306
+ MTR_LOG_ERROR (" %@ : %@ Error: %s" , NSStringFromClass (self. class ) , self, [kDeviceControllerErrorNotRunning UTF8String ]);
1307
1307
if (error) {
1308
1308
*error = [MTRError errorForCHIPErrorCode: CHIP_ERROR_INCORRECT_STATE];
1309
1309
}
0 commit comments