I am building a custom app in WordPress, so I need some means of logging my events. I searched and found this plugin – http://wordpress.org/extend/plugins/wp-logs/ which looks very convenient to use. It uses database to store logs and can display them in the backend itself.
Another option for me is to learn WP filesystem (something which I haven’t tried yet) and use it to write logs to file on disk. What do you think would be best considering the tradeoff between performance & convenience?
Database write is equal to I/O write
+ some extra work. Thoughts?
I would prefer to use WP-Logs plugin because its code looks pretty well and you will not waste so much time writing something completely from the scratch.
I also store data in the database more likely because I think database could be scaled more efficiently when needed. The another reason why I would prefer database is that the data could be accessed more easily by other plugins/APIs. From my point of view it’s more secure too (for me it’s easier to secure the database then the files on the FTP or in case when you need to access it from the external source…).