Menu

#20 Does not write to file immediately

open
nobody
None
5
2001-01-01
2001-01-01
Anonymous
No

there are times when the information is not writen to the file immediately. the last few lines of most logs are often cut off

Discussion

  • red0x

    red0x - 2001-01-10

    try a flush() call

    red0x

     
  • Marco Bono

    Marco Bono - 2001-08-14

    Logged In: YES
    user_id=279710

    If the file open commands are changed to use 'binary'
    access instead of 'append', the files will always be upto
    date. The 'print' statements will need to be replaced
    with 'put' statements (which initiate a flush automatically
    everytime they are called). Additionally, to
    simulate 'append' functionality with 'binary', an
    initial 'seek' statement (with 'filelen()' as one of the
    argunments) will be needed to set the 'puts' to add to the
    end of the file instead of overwriting the file. Its a long
    solution, but it will insure that all data is always
    written incase of abnormal program termination before a
    flush can be initiated.

     

Log in to post a comment.

MongoDB Logo MongoDB