Created
April 9, 2016 11:31
-
-
Save fcaldarelli/605227c4847525ad053bb5b384161656 to your computer and use it in GitHub Desktop.
Logger Macro for iOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Logger.h | |
// SlotCore | |
// | |
// Created by Fabrizio on 08/04/16. | |
// Copyright © 2016 Fabrizio Caldarelli. All rights reserved. | |
// | |
#ifndef Logger_h | |
#define Logger_h | |
// Definisce forme più specifiche per il debug | |
#ifdef DEBUG | |
#define LogInfo(category, fmt, ...) NSLog((@"[%@] " fmt), category, ##__VA_ARGS__); | |
#define LogErr(fmt, ...) NSLog((@"[ERR] %s[Ln %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); | |
#endif | |
// Disabilita NSLog quando non si è in modalità DEBUG | |
#ifndef DEBUG | |
#define NSLog(...); | |
#endif | |
#endif /* Logger_h */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment