Log in

View Full Version : Multiuser PHP Logging system



clowes
03-10-2009, 03:16 PM
I have numerous websites on a multi domain hosting account.
What I essentially have is 10 folders. What is contained in each folder is 1 website.

I am having difficulty managing my websites.
I want to create a logging system which logs actions throughout all of my websites.

Mysql would be great:

A database with a table called logs.
My Columns would be ID, Site, User, Action, Date

My problem is that all of my websites use mysql databases anyway.
Website1 connects to Database1
Website2 to Database2 etc

I dont want a log table in EACH database, i want a log table in one database. To do that however I would have to disconnect from the website database, connect to the log database, do the query, disconnect from logs, and reconnect to the website: clearly very inefficient.

I then considered text files, but some sites utilize php scripts within wordpress using exec-php, making actually locating the paths to text files difficult. Furthermore text files are harder to manipulate.

Could anyone suggest the best way to create this kind of logging system?
Many Thanks

clowes
03-13-2009, 12:40 PM
Anyone?!