git.ucc.asn.au
/
tpg
/
opendispense2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Server - Fix inverted logic in enabling/disabling syslog
[tpg/opendispense2.git]
/
src
/
server
/
logging.c
diff --git
a/src/server/logging.c
b/src/server/logging.c
index
dc3cc4c
..
2ef0e12
100644
(file)
--- a/
src/server/logging.c
+++ b/
src/server/logging.c
@@
-11,24
+11,24
@@
#include <syslog.h>
// === GLOBALS ===
#include <syslog.h>
// === GLOBALS ===
-bool gbSyslog
En
abled = true;
+bool gbSyslog
Dis
abled = true;
// === CODE ==
void Log_Error(const char *Format, ...)
{
va_list args;
// === CODE ==
void Log_Error(const char *Format, ...)
{
va_list args;
- va_start(args, Format);
- if( gbSyslogEnabled )
+ if( !gbSyslogDisabled )
{
{
+ va_start(args, Format);
vsyslog(LOG_WARNING, Format, args);
vsyslog(LOG_WARNING, Format, args);
+ va_end(args);
}
}
- else
- {
- fprintf(stderr, "WARNING: ");
- vfprintf(stderr, Format, args);
- fprintf(stderr, "\n");
- }
+
+ va_start(args, Format);
+ fprintf(stderr, "WARNING: ");
+ vfprintf(stderr, Format, args);
+ fprintf(stderr, "\n");
va_end(args);
}
va_end(args);
}
@@
-36,17
+36,16
@@
void Log_Info(const char *Format, ...)
{
va_list args;
{
va_list args;
- va_start(args, Format);
- if( gbSyslogEnabled )
+ if( !gbSyslogDisabled )
{
{
+ va_start(args, Format);
vsyslog(LOG_INFO, Format, args);
vsyslog(LOG_INFO, Format, args);
+ va_end(args);
}
}
- else
- {
- fprintf(stderr, "WARNING: ");
- vfprintf(stderr, Format, args);
- fprintf(stderr, "\n");
- }
+ va_start(args, Format);
+ fprintf(stderr, "INFO: ");
+ vfprintf(stderr, Format, args);
+ fprintf(stderr, "\n");
va_end(args);
}
va_end(args);
}
UCC
git Repository :: git.ucc.asn.au