-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completely disable and hide NSLogger strings in Swift #290
Comments
That's a very good question. This is interesting because last time I checked the call was optimized out completely. This may be an issue with the Swift optimizer which eliminates the call a point-of-log, but may not remove the closure it auto-generates from the string... Thanks for pointing this out! As of now, I don't have a hint at how one could fix it. |
Thank you @fpillet. This is what I thought. |
I couldn't find a solution for the text in the closure, but I also noticed that #file and #function attributes are behaving the same way, leaving the absolute path and function name in the binary. It increases the size of the binary and exposes the user name of the developer.
to this resolves this issue:
|
Pull request to remove #file and #function strings from release binary |
In Objective C if I use the macros defined in NSLogger.h completely disable NSLogger and logging message strings don't show up in the release binary.
In Swift, in the release binary, the logging functionality is disabled but the logging message strings remain hardcoded in the released binary.
Is there any way to strip those logging strings completely from the release binary?
The text was updated successfully, but these errors were encountered: