forked from F8LEFT/SoFixer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFDebug.h
31 lines (26 loc) · 1.08 KB
/
FDebug.h
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
//===------------------------------------------------------------*- C++ -*-===//
//
// Created by F8LEFT on 2018/7/4.
// Copyright (c) 2018. All rights reserved.
//===----------------------------------------------------------------------===//
//
//===----------------------------------------------------------------------===//
#ifndef ANDDBG_ALOG_H
#define ANDDBG_ALOG_H
#if !defined(NDEBUG)
#define TOSTR(fmt) #fmt
#define FLFMT TOSTR([%s:%d])
#define FNLINE TOSTR(\n)
#define FLOGE(fmt, ...) printf(FLFMT fmt FNLINE, __FUNCTION__, __LINE__, ##__VA_ARGS__)
#define FLOGD(fmt, ...) printf(FLFMT fmt FNLINE, __FUNCTION__, __LINE__, ##__VA_ARGS__)
#define FLOGW(fmt, ...) printf(FLFMT fmt FNLINE, __FUNCTION__, __LINE__, ##__VA_ARGS__)
#define FLOGI(fmt, ...) printf(FLFMT fmt FNLINE, __FUNCTION__, __LINE__, ##__VA_ARGS__)
#define FLOGV(fmt, ...) printf(FLFMT fmt FNLINE, __FUNCTION__, __LINE__, ##__VA_ARGS__)
#else
#define FLOGE(fmt, ...)
#define FLOGD(fmt, ...)
#define FLOGW(fmt, ...)
#define FLOGI(fmt, ...)
#define FLOGV(fmt, ...)
#endif
#endif //ANDDBG_ALOG_H