[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Logging NSData
From: |
Andreas Höschler |
Subject: |
Logging NSData |
Date: |
Thu, 21 Jul 2011 19:15:22 +0200 |
Hi all,
I am logging out NSDictionaries that sometimes contain NSData instances as
values. On MacOSX NSData::description is called to determine a string that is
used in the output. I don't want to see tons of hex values for large NSData
objects in the output and therefore wrote the following category:
@implementation NSData (SRDataExtension)
- (NSString *)description
{
return [NSString stringWithFormat:@"<data of length %d>", [self length]];
}
@end
This works great on MacOSX but not under GNUstep. It seems that description is
not called under GNUstep when a dictionary is logged out with
NSLog(@"dic %@", dic);
Any idea?
Thanks a lot!
Andreas
- Logging NSData,
Andreas Höschler <=
- Re: Logging NSData, Richard Frith-Macdonald, 2011/07/22