Changeset 300

Show
Ignore:
Timestamp:
06/19/10 15:09:54 (20 months ago)
Author:
ol
Message:

Change log behaviour to not share same FILE pointer between process, related to FCGI. Remove end query log.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/ows/ows.c

    r299 r300  
    254254    time_t ts; 
    255255 
     256    if (o->log_file) 
     257        o->log = fopen(o->log_file->buf, "a"); 
     258 
    256259    if (!o->log) return; 
    257260 
     
    267270    else if (log_level == 3) fprintf(o->log, "[%s] [QUERY] %s\n", t, log); 
    268271    else if (log_level == 4) fprintf(o->log, "[%s] [DEBUG] %s\n", t, log); 
     272 
     273 
     274    fclose(o->log); 
    269275} 
    270276 
     
    341347    /* Parse the configuration file and initialize ows struct */ 
    342348    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"); 
    347349 
    348350    if (!o->exit) ows_log(o, 2, "== TINYOWS STARTUP =="); 
     
    438440     
    439441    if (cgi_method_post() && query) free(query);  /* We allocated memory only on post case */ 
    440     ows_log(o, 2, "== End QUERY ==");  
    441442#if TINYOWS_FCGI 
    442443    o->exit = false; 
     
    447448    xmlCleanupParser(); 
    448449    ows_log(o, 2, "== TINYOWS SHUTDOWN =="); 
    449     if (o->log) fclose (o->log); 
    450450    ows_free(o); 
    451451