Console output is cut short <...>

Hi --


I'm pretty new to this, and not a developer, but work on a product where I need to look at the output in xcode. Before xcode 9, I could see the entire output in the console. However, now, if the output is log, I see <...> at the end, and I can't get everything to show.


Thanks so much for the help,


Zach

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"

I've got this error too. Eg. logging out 64bit num will end up with ..AMAsCAga2AgEBBAIMA<…> but I need to see it in the full.

What API are you using to do the logging?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I use NSLog and I cant see the whole log in the console app

Console output is cut short <...>
 
 
Q