Skip to content

Commit d2d5299

Browse files
committed
fix 打印日志函数的bug
1 parent 6b917ae commit d2d5299

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

LKDBHelper/Helper/NSObject+LKModel.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,16 +408,16 @@ -(NSString *)printAllPropertysIsContainParent:(BOOL)containParent
408408
{
409409
#ifdef DEBUG
410410
Class clazz = [self class];
411-
NSMutableString* sb = [NSMutableString stringWithFormat:@"\n <%@> :\n", clazz];
411+
NSMutableString* sb = [NSMutableString stringWithFormat:@"\n <%@> :\n", NSStringFromClass(clazz)];
412412
[sb appendFormat:@"rowid : %d\n",self.rowid];
413-
[NSObject mutableString:sb appendPropertyStringWithClass:clazz containParent:containParent];
413+
[self mutableString:sb appendPropertyStringWithClass:clazz containParent:containParent];
414414
NSLog(@"%@",sb);
415415
return sb;
416416
#else
417417
return @"";
418418
#endif
419419
}
420-
+(void)mutableString:(NSMutableString*)sb appendPropertyStringWithClass:(Class)clazz containParent:(BOOL)containParent
420+
-(void)mutableString:(NSMutableString*)sb appendPropertyStringWithClass:(Class)clazz containParent:(BOOL)containParent
421421
{
422422
unsigned int outCount, i;
423423
objc_property_t *properties = class_copyPropertyList(clazz, &outCount);
@@ -429,6 +429,7 @@ +(void)mutableString:(NSMutableString*)sb appendPropertyStringWithClass:(Class)c
429429
free(properties);
430430
if(containParent)
431431
{
432+
432433
[self mutableString:sb appendPropertyStringWithClass:self.superclass containParent:containParent];
433434
}
434435
}

0 commit comments

Comments
 (0)