logging: extend functionality

Add a function to get the current minimum severity and a function to set
a global prefix for debug messages in order to identify messages from
helpers.
This commit is contained in:
Miroslav Lichvar
2020-07-16 13:16:15 +02:00
parent 2bb0769516
commit 51d77d6cfc
2 changed files with 33 additions and 1 deletions

View File

@@ -97,6 +97,12 @@ extern void LOG_Message(LOG_Severity severity, const char *format, ...);
prefixed with the filename, line number, and function name. */
extern void LOG_SetMinSeverity(LOG_Severity severity);
/* Get the minimum severity */
extern LOG_Severity LOG_GetMinSeverity(void);
/* Set a prefix for debug messages */
extern void LOG_SetDebugPrefix(const char *prefix);
/* Log messages to a file instead of stderr, or stderr again if NULL */
extern void LOG_OpenFileLog(const char *log_file);