sylvest Posted January 5, 2017 Posted January 5, 2017 I have a logmsg function in my PHP which is meant to record in a log file any errors that occur, with the time and date, the error's severity, and the line number and file name where they occurred (using __LINE__ and __FILE__). It sometimes works, but not always. Sometimes I get nothing added to the log file. Could this be to do with how PHP terminates? What happens if the logfile is not closed properly (which it won't be if there is a fatal error)? Or does some text get stuck in a buffer somewhere and never get written to the file? What can I do to make sure that any such buffers are flushed? Thanks - Rowan Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.