@@ -338,7 +338,7 @@ void RunOnBackgroundThread(void (*function_ptr)(void *function_data), void *func
338
338
// implements a stub for the method).
339
339
const char *type_encoding =
340
340
method_getTypeEncoding (class_getInstanceMethod (type_encoding_class, name));
341
- FIREBASE_ASSERT (type_encoding);
341
+ assert (type_encoding);
342
342
343
343
NSString *new_method_name_nsstring = nil ;
344
344
if (GetLogLevel () <= kLogLevelDebug ) {
@@ -397,7 +397,9 @@ void RunOnBackgroundThread(void (*function_ptr)(void *function_data), void *func
397
397
selector_implementation_names_per_selector_[selector_name_nsstring];
398
398
const char *class_name = class_getName (clazz);
399
399
if (!selector_implementation_names) {
400
- firebase::LogDebug (" Method not cached for class %s selector %s." , class_name, selector_name);
400
+ if (GetLogLevel () <= kLogLevelDebug ) {
401
+ NSLog (@" Method not cached for class %s selector %s ." , class_name, selector_name);
402
+ }
401
403
return nil ;
402
404
}
403
405
@@ -415,23 +417,29 @@ void RunOnBackgroundThread(void (*function_ptr)(void *function_data), void *func
415
417
search_class = clazz;
416
418
for (; search_class; search_class = class_getSuperclass (search_class)) {
417
419
const char *search_class_name = class_getName (search_class);
418
- firebase::LogDebug (" Searching for selector %s (%s) on class %s" , selector_name,
419
- selector_implementation_name, search_class_name);
420
+ if (GetLogLevel () <= kLogLevelDebug ) {
421
+ NSLog (@" Searching for selector %s (%s ) on class %s " , selector_name,
422
+ selector_implementation_name, search_class_name);
423
+ }
420
424
Method method = class_getInstanceMethod (search_class, selector_implementation);
421
425
method_implementation = method ? method_getImplementation (method) : nil ;
422
426
if (method_implementation) break ;
423
427
}
424
428
if (method_implementation) break ;
425
429
}
426
430
if (!method_implementation) {
427
- firebase::LogDebug (" Class %s does not respond to selector %s (%s)" , class_name, selector_name,
428
- selector_implementation_name_nsstring.UTF8String );
431
+ if (GetLogLevel () <= kLogLevelDebug ) {
432
+ NSLog (@" Class %s does not respond to selector %s (%s )" , class_name, selector_name,
433
+ selector_implementation_name_nsstring.UTF8String);
434
+ }
429
435
return nil ;
430
436
}
431
- firebase::LogDebug (" Found %s (%s, 0x%08x) on class %s (%s)" , selector_name,
432
- selector_implementation_name_nsstring.UTF8String ,
433
- static_cast <int >(reinterpret_cast <intptr_t >(method_implementation)),
434
- class_name, class_getName (search_class));
437
+ if (GetLogLevel () <= kLogLevelDebug ) {
438
+ NSLog (@" Found %s (%s , 0x%08x ) on class %s (%s )" , selector_name,
439
+ selector_implementation_name_nsstring.UTF8String,
440
+ static_cast <int >(reinterpret_cast <intptr_t >(method_implementation)), class_name,
441
+ class_getName(search_class));
442
+ }
435
443
return method_implementation;
436
444
}
437
445
0 commit comments