| 1 |
/** |
| 2 |
* Filesystem helpers |
| 3 |
|
| 4 |
* Copyright (C) 2007, 2008, 2009 Sylvain Beucler |
| 5 |
|
| 6 |
* This file is part of GNU FreeDink |
| 7 |
|
| 8 |
* GNU FreeDink is free software; you can redistribute it and/or |
| 9 |
* modify it under the terms of the GNU General Public License as |
| 10 |
* published by the Free Software Foundation; either version 3 of the |
| 11 |
* License, or (at your option) any later version. |
| 12 |
|
| 13 |
* GNU FreeDink is distributed in the hope that it will be useful, but |
| 14 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
* General Public License for more details. |
| 17 |
|
| 18 |
* You should have received a copy of the GNU General Public License |
| 19 |
* along with this program. If not, see |
| 20 |
* <http://www.gnu.org/licenses/>. |
| 21 |
*/ |
| 22 |
|
| 23 |
#ifndef _LOG_H |
| 24 |
#define _LOG_H |
| 25 |
#include "SDL.h" |
| 26 |
|
| 27 |
extern int debug_mode; |
| 28 |
|
| 29 |
#define log_trace(...) SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_VERBOSE, __VA_ARGS__) |
| 30 |
#define log_debug(...) SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG, __VA_ARGS__) |
| 31 |
#define log_info(...) SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, __VA_ARGS__) |
| 32 |
#define log_warn(...) SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, __VA_ARGS__) |
| 33 |
#define log_error(...) SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_ERROR, __VA_ARGS__) |
| 34 |
#define log_fatal(...) SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_CRITICAL, __VA_ARGS__) |
| 35 |
|
| 36 |
extern void log_init(); |
| 37 |
extern void log_quit(); |
| 38 |
extern void log_debug_on(); |
| 39 |
extern void log_debug_off(); |
| 40 |
|
| 41 |
extern const char* log_getLastLog(); |
| 42 |
extern void log_set_output_file(const char* filename); |
| 43 |
|
| 44 |
#endif |