Changeset 300
- Timestamp:
- 06/19/10 15:09:54 (20 months ago)
- Files:
-
- 1 modified
-
trunk/src/ows/ows.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ows/ows.c
r299 r300 254 254 time_t ts; 255 255 256 if (o->log_file) 257 o->log = fopen(o->log_file->buf, "a"); 258 256 259 if (!o->log) return; 257 260 … … 267 270 else if (log_level == 3) fprintf(o->log, "[%s] [QUERY] %s\n", t, log); 268 271 else if (log_level == 4) fprintf(o->log, "[%s] [DEBUG] %s\n", t, log); 272 273 274 fclose(o->log); 269 275 } 270 276 … … 341 347 /* Parse the configuration file and initialize ows struct */ 342 348 if (!o->exit) ows_parse_config(o, o->config_file->buf); 343 344 /* Open Log file */345 if (!o->exit && o->log_file)346 o->log = fopen(o->log_file->buf, "a");347 349 348 350 if (!o->exit) ows_log(o, 2, "== TINYOWS STARTUP =="); … … 438 440 439 441 if (cgi_method_post() && query) free(query); /* We allocated memory only on post case */ 440 ows_log(o, 2, "== End QUERY ==");441 442 #if TINYOWS_FCGI 442 443 o->exit = false; … … 447 448 xmlCleanupParser(); 448 449 ows_log(o, 2, "== TINYOWS SHUTDOWN =="); 449 if (o->log) fclose (o->log);450 450 ows_free(o); 451 451