It’s hard to give definitive answers without more info about your environment. What platform are you testing on? What version of that platform? And how are you logging?
However, it seems likely that you’re hitting a known restriction of
NSLog
on modern OS releases (anything that supports unified logging, as discussed in WWDC 2016 Session 721
Unified Logging and Activity Tracing). On such systems
NSLog
is layered on top of unified logging which has a limit on the length of the dynamic content in any given log entry (1024 bytes if I recall correctly).
The best way around this depends on your context. For example:
If you need to log big things when your app is deployed in the field, unified logging isn’t really the right choice and you should construct your own logging infrastructure.
If you’re just trying to debug in Xcode, you can print stuff to
stdout
or stderr
(using print
in Swift and printf
in C-based languages) and Xcode will pick things up from there.
If you post more info about your specific circumstances I should be able to offer more concrete suggestions.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"