Problem with INSERT function
When you write your INSERT query:

INSERT (log, POSITION(' edited' IN log), 1, 'NOW()')


In this way the DBMS thinks you try to put in your date field a string named "NOW()" instead of function to retrieve the current timestamp

You must remove the ' ' around NOW() function. In this way:

INSERT (log, POSITION(' edited' IN log), 1, NOW())