| 6 |
| * Copyright Nikolai Kudashov, 2015. |
| 7 | */ |
| 8 |
| 9 | #ifndef FILELOG_H |
| 10 | #define FILELOG_H |
| 11 |
| 12 | #include "Defines.h" |
| 13 |
| 14 | class FileLog { |
| 15 | public: |
| 16 | static void init(std::string path); |
| 17 | static void e(const char *message, ...) __attribute__((format (printf, 1, 2))); |
| 18 | static void w(const char *message, ...) __attribute__((format (printf, 1, 2))); |
| 19 | static void d(const char *message, ...) __attribute__((format (printf, 1, 2))); |
| 20 | }; |
| 21 |
| 22 | #ifdef DEBUG_VERSION |
| 23 | #define DEBUG_E FileLog::e |
| 24 | #define DEBUG_W FileLog::w |
| 25 | #define DEBUG_D FileLog::d |
| 26 | #else |
| 27 | #define DEBUG_E |
| 28 | #define DEBUG_W |
| 29 | #define DEBUG_D |
| 30 | #endif |
| 31 |
| 32 | #endif |
| 33 |