diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2009-04-21 18:48:58 +0000 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2009-04-21 18:48:58 +0000 |
commit | 6e9fe153fc485c1bf22180fb4189d160c511f2c8 (patch) | |
tree | 596dfd04041c1d6119162a43329644d7b2ef6785 /src/pluto/log.c | |
parent | b757ebc2a7829644cf632c67db0e78650ea1dcdd (diff) | |
download | strongswan-6e9fe153fc485c1bf22180fb4189d160c511f2c8.tar.bz2 strongswan-6e9fe153fc485c1bf22180fb4189d160c511f2c8.tar.xz |
added plugin load mechanism to pluto and scepclient and improved debug output4.3.0
Diffstat (limited to 'src/pluto/log.c')
-rw-r--r-- | src/pluto/log.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/pluto/log.c b/src/pluto/log.c index 293c99d58..15bab5d0a 100644 --- a/src/pluto/log.c +++ b/src/pluto/log.c @@ -87,10 +87,10 @@ u_int16_t cur_from_port; /* host order */ static void pluto_dbg(int level, char *fmt, ...) { int priority = LOG_INFO; + int debug_level; char buffer[8192]; char *current = buffer, *next; va_list args; - int debug_level; if (cur_debugging & DBG_PRIVATE) { @@ -115,7 +115,10 @@ static void pluto_dbg(int level, char *fmt, ...) if (log_to_stderr) { - fprintf(stderr, "| "); + if (level > 1) + { + fprintf(stderr, "| "); + } vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); } @@ -132,7 +135,7 @@ static void pluto_dbg(int level, char *fmt, ...) { *(next++) = '\0'; } - syslog(priority, "| %s\n", current); + syslog(priority, "%s%s\n", (level > 1)? "| ":"", current); current = next; } } |