Simple replacement for NSLog
According to Apple's documentation NSLog.
Logs an error message to the Apple System Log facility
NSLogis really very simple and helpful when debugging programs.- It is better to remove
NSLogin release production. - Since Xcode8, it is hard to console logs with colorful theme.
- Sometimes we need save log to files.
Just drag ZZYLog.h and ZZYLog.m file to your project and then import "ZZYLog.h"
ZError(@"Simple Error"); ZWarning(@"Simple Warning"); ZInfo(@"Just simple info"); ZDebug(@"Everything is OK"); ZFile(@"Simple message write to file"); ZError(@"Something has go wrong with address %p",self); ZWarning(@"Warning----%d----%@----%p",12,@"msg",self); int a = 12; int b = 25; ZDebug(@"%d + %d = %d",a,b,(a+b));- Error ----- ❌
- Warning ----- 🍋
- Info ----- 🍏
- Debug ----- 🍎
- File ----- write to disk