-
Notifications
You must be signed in to change notification settings - Fork 11
/
Log.pch
40 lines (27 loc) · 1.03 KB
/
Log.pch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// Log.pch
// MathSolver
//
// Created by Kostub Deshmukh on 5/26/16.
// Copyright © 2016 Kostub Deshmukh.
//
// This software may be modified and distributed under the terms of the
// MIT license. See the LICENSE file for details.
//
#ifndef Log_pch
#define Log_pch
// Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
#if defined(DEBUG)
#define InfoLog(__FORMAT__, ...) NSLog((@"%s [Line %d] $ " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
#else
#define InfoLog(...)
#endif
#if defined(DEBUG)
#define DLog(__FORMAT__, ...) NSLog((@"[D] %s [Line %d] " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
#define FatalLog(__FORMAT__, ...) InfoLog(__FORMAT__, ##__VA_ARGS__) ; NSAssert(false, __FORMAT__, ##__VA_ARGS__);
#else
#define FatalLog(__FORMAT__, ...) InfoLog(__FORMAT__, ##__VA_ARGS__)
#define DLog(...)
#endif
#endif /* Log_pch */