logging: don't save debugging arguments when debug is disabled

Don't save the facility number, line number, function name and filename
in the compiled binary unless the debugging support is enabled.
This commit is contained in:
Miroslav Lichvar
2015-09-24 18:31:17 +02:00
parent bd8be7133d
commit 7b2430fc3c
3 changed files with 32 additions and 9 deletions

View File

@@ -76,9 +76,12 @@ static int no_dns = 0;
int log_debug_enabled = 0;
void LOG_Message(LOG_Severity severity, LOG_Facility facility,
int line_number, const char *filename,
const char *function_name, const char *format, ...)
void LOG_Message(LOG_Severity severity,
#if DEBUG > 0
LOG_Facility facility, int line_number,
const char *filename, const char *function_name,
#endif
const char *format, ...)
{
va_list ap;