/ZZYLogger

Simple extension for NSLog

Primary LanguageObjective-CMIT LicenseMIT

ZZYLogger

Simple replacement for NSLog

Why

According to Apple's documentation NSLog.

Logs an error message to the Apple System Log facility

  • NSLog is really very simple and helpful when debugging programs.
  • It is better to remove NSLog in release production.
  • Since Xcode8, it is hard to console logs with colorful theme.
  • Sometimes we need save log to files.

Usage

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));

Output

  • Error ----- ❌
  • Warning ----- 🍋
  • Info ----- 🍏
  • Debug ----- 🍎
  • File ----- write to disk