DaveWoodCom / XCGLogger

A debug log framework for use in Swift projects. Allows you to log details to the console (and optionally a file), just like you would have with NSLog() or print(), but with additional information, such as the date, function name, filename and line number.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

String output truncation when using AppleSystemLogDestination

michaeloey opened this issue · comments

Hi,

I encountered and Issues when using AppleSystemLogDestination for verbose console output as in 1000+ characters. The message string is being truncated at 750-900 characters. I eventually fixed the issue by using ConsoleDestination instead. This is what I was looking for originally.

Just wanted to know, is this a side effect of using NSLog in Swift 4.0/Xcode 9.2? Does it have to do with multi-threading and the use of NSLog?

I originally used AppleSystemLogDestination because it is prescribed in the the README.md. Should this example be changed to use ConsoleDestination instead to avoid others getting stuck as I did?

This does appear to be a limitation of the Apple System Log.