| 1 | /* |
| 2 | * Copyright (C) 2013 Canonical Ltd. |
| 3 | * |
| 4 | * Contact: Alberto Mardegan <[email protected]> |
| 5 | * |
| 6 | * This file is part of lomiri-online-accounts-ui and lomiri-online-accounts- |
| 7 | * service |
| 8 | * |
| 9 | * This program is free software: you can redistribute it and/or modify it |
| 10 | * under the terms of the GNU General Public License version 3, as published |
| 11 | * by the Free Software Foundation. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, but |
| 14 | * WITHOUT ANY WARRANTY; without even the implied warranties of |
| 15 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
| 16 | * PURPOSE. See the GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License along |
| 19 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
| 20 | */ |
| 21 | #ifndef OAU_DEBUG_H |
| 22 | #define OAU_DEBUG_Hcxx . . $ `online-accounts-common/debug.h:22:9`! |
| 23 | |
| 24 | #include <QDebug> |
| 25 | |
| 26 | /* 0 - fatal, 1 - critical(default), 2 - info/debug */ |
| 27 | extern int appLoggingLevelcxx . . $ appLoggingLevel.; |
| 28 | |
| 29 | static inline bool debugEnabledcxx . . $ debugEnabled(c9857a73d68e59ba).() |
| 30 | { |
| 31 | return appLoggingLevelcxx . . $ appLoggingLevel. >= 2; |
| 32 | } |
| 33 | |
| 34 | static inline int loggingLevelcxx . . $ loggingLevel(b126dc7c1de90089).() |
| 35 | { |
| 36 | return appLoggingLevelcxx . . $ appLoggingLevel.; |
| 37 | } |
| 38 | |
| 39 | void setLoggingLevelcxx . . $ setLoggingLevel(d4f767463ce0a6b3).(int level); |
| 40 | |
| 41 | #ifdef DEBUG_ENABLEDcxx . . $ `<built-in>:477:9`! |
| 42 | #define DEBUGcxx . . $ `online-accounts-common/debug.h:42:13`!() \ |
| 43 | if (debugEnabled()) qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!() << __FILE__ << __LINE__ << __func__ |
| 44 | #else |
| 45 | #define DEBUG() while (0) qDebug() |
| 46 | #endif |
| 47 | |
| 48 | #endif // OAU_DEBUG_H |