diff --git a/index.php b/index.php index c23be07..82137f8 100644 --- a/index.php +++ b/index.php @@ -60,8 +60,11 @@ $type = ""; } - // Create a timestamp in ISO 8601 format for the filename - $timestamp = date( "c" ); + // Create a timestamp for the filename + // This format has milliseconds, so should avoid logs being overwritten. + // If you have > 1000 requests per second, please use a different server. + $timestamp = ( new DateTime() )->format( DATE_RFC3339_EXTENDED ); + // Filename for the log $filename = "{$timestamp}{$type}.txt";