I am designing a online website (PHP, HTML and MySQL) with one of the functionalities being able to upload and download the records to/from database. I want to keep a log of all the records that were successfully added to the database and all the failed ones as well. If I wish to save this log file on the local machine, how should I go about with designing the log system ? i.e.
- location of the log file and being compatible with various O.S
- General format that can provide as much information as possible i.e SQL error
- Any other pointers I need to consider.
Can anyone please guide me to the correct setup?
I have included include '/Logger.php';
line in my php file. However, I want to write the log to a file and I don't understand if the configuration file is log4php.xml
or appender_file.properties
. Can anyone please tell me the setup to log write to a file/?