comparison svr-session.c @ 1210:64a50eac1030

Moved usingsyslog from svr_runopts to runopts.
author Konstantin Tokarev <ktokarev@smartlabs.tv>
date Tue, 01 Dec 2015 21:52:38 +0300
parents 43a8ea69b24c
children d058e15ea213
comparison
equal deleted inserted replaced
1209:ab7d9c12caa7 1210:64a50eac1030
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(&timesec); 222 local_tm = localtime(&timesec);
223 if (local_tm == NULL 223 if (local_tm == NULL