Re: efficient log system

From: Date: Tue, 12 Jun 2007 11:34:07 +0000
Subject: Re: efficient log system
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-256679@lists.php.net to get a copy of this message
Alain Roger wrote: > Hi, > > I would like to create a log system to keep a trace of all users' actions > (log-in, remove, change or update data, and so on...). > What should i do or to what should i take care to not have problem ? > > I was thinking to create a folder on my server where log files will be > stored, but what is the best practice. Very open ended question! You should just approach this like any other design decision tho', look at why you are keeping it, how you are going to query it, what you will use it for etc. then design it appropriately. First thought is stick it in a database with a user_id, date and a description of the change (perhaps include a unified diff if it's appropriate so that the actual change is quite obvious - this may impose a fairly large amount of overhead tho). It all depends on you application, how you design your general storage backend, and how you use it. Col

« previous php.general (#256679) next »