Mercurial > dropbear
comparison svr-session.c @ 1214:61d3f56808a4
Merge pull request #18 from annulen/dbclient_syslog
Support syslog logging in dbclient.
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 15 Dec 2015 21:55:51 +0800 |
parents | 64a50eac1030 |
children | d058e15ea213 |
comparison
equal
deleted
inserted
replaced
1209:ab7d9c12caa7 | 1214:61d3f56808a4 |
---|---|
202 int havetrace = 0; | 202 int havetrace = 0; |
203 | 203 |
204 vsnprintf(printbuf, sizeof(printbuf), format, param); | 204 vsnprintf(printbuf, sizeof(printbuf), format, param); |
205 | 205 |
206 #ifndef DISABLE_SYSLOG | 206 #ifndef DISABLE_SYSLOG |
207 if (svr_opts.usingsyslog) { | 207 if (opts.usingsyslog) { |
208 syslog(priority, "%s", printbuf); | 208 syslog(priority, "%s", printbuf); |
209 } | 209 } |
210 #endif | 210 #endif |
211 | 211 |
212 /* if we are using DEBUG_TRACE, we want to print to stderr even if | 212 /* if we are using DEBUG_TRACE, we want to print to stderr even if |
213 * syslog is used, so it is included in error reports */ | 213 * syslog is used, so it is included in error reports */ |
214 #ifdef DEBUG_TRACE | 214 #ifdef DEBUG_TRACE |
215 havetrace = debug_trace; | 215 havetrace = debug_trace; |
216 #endif | 216 #endif |
217 | 217 |
218 if (!svr_opts.usingsyslog || havetrace) | 218 if (!opts.usingsyslog || havetrace) |
219 { | 219 { |
220 struct tm * local_tm = NULL; | 220 struct tm * local_tm = NULL; |
221 timesec = time(NULL); | 221 timesec = time(NULL); |
222 local_tm = localtime(×ec); | 222 local_tm = localtime(×ec); |
223 if (local_tm == NULL | 223 if (local_tm == NULL |