logging: set debug level instead of on/off

Prefix messages written to terminal with filename, line and function
name only with debug level 2 and higher.
This commit is contained in:
Miroslav Lichvar
2014-04-08 18:44:17 +02:00
parent 7c45b1d2a3
commit 788e7fcd89
3 changed files with 21 additions and 13 deletions

View File

@@ -102,8 +102,12 @@ extern void LOG_Message(LOG_Severity severity, LOG_Facility facility,
int line_number, const char *filename,
const char *function_name, const char *format, ...);
/* Enable logging of debug messages */
extern void LOG_EnableDebug(void);
/* Set debug level:
0, 1 - only non-debug messages are logged
2 - debug messages are logged too, all messages are prefixed with
filename, line, and function name
*/
extern void LOG_SetDebugLevel(int level);
/* Log messages to syslog instead of stderr */
extern void LOG_OpenSystemLog(void);