Is writing server log files to a database a good idea?

Write locally to disk, then batch insert to the database periodically (e.g. at log rollover time). Do that in a separate, low-priority process. More efficient and more robust…

(Make sure that your database log table contains a column for “which machine the log event came from” by the way – very handy!)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)