简体   繁体   中英

NSLog not printing messages to console after packaging the static library to a framework

I have a static library which I use this iOS Framework Script to generate a .framework file and distribute to developers.

But, currently there is an issue appeared that it only happens when packaging and using the .framework in a client application! When using the static library by the way it works perfect, NSLog and the problem I have it's not reproducing.

What I want to ask is, why I lost my NSLog messages? Does this have to do with debug/release scheme configuration? The framework script does not seem to remove with any configuration in the command line the debug logging, I don't remember anyway if in release it removes the NSLogs?!

Any thoughts how to make my debug NSLog messages appear again, maybe a setting that I switched values and now banging my head to find and resolve the issue?

I found the proper way to use log messages with level as instructed by Apple using the ASL (Apple Logging System).

https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/LoggingErrorsAndWarnings.html#//apple_ref/doc/uid/10000172i-SW8-SW1

That said using this great wrapper by Mike Weller did the job and I can control better the logging to console plus I finally have console output from my static framework.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM