Changeset 93 in libcf for trunk/src/cf_log.c


Ignore:
Timestamp:
05/23/13 18:04:09 (11 years ago)
Author:
cheese
Message:

#1 fix logging to append if the file exists

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cf_log.c

    r87 r93  
    391391{
    392392    int result = 0;
     393    int fileFlag = CF_FILE_CREATE|CF_FILE_WRITE|CF_FILE_APPEND;
    393394    int size = (memsize == CF_LOG_BUFFER_DEFAULT)
    394395             ? LOG_BUFFER_DEFAULT_SIZE
     
    409410        }
    410411
    411         context->fd = CF_File_Create (path);
     412        context->fd = CF_File_Open (path, fileFlag);
    412413        if (context->fd < 0)
    413414        {
     
    435436    }
    436437
    437     return CF_OK;
     438    return result;
    438439}
    439440
Note: See TracChangeset for help on using the changeset viewer.