Re: efficient log system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, June 12, 2007 6:26 am, Alain Roger wrote:
> 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.

You probably can't get too much more efficient/reliable than a simple
http://php.net/error_log wrapped inside your own function to make it
easier to hit the file you want.

You could dink around with logging into a database, perhaps, and that
has some benefits in terms of analysis queries.

If Performance is way more important than anything else, perhaps log
to a ram disk and sync that to a real hard drive in a cron job...  But
you'd lose any recent activity in a crash or a really savvy attacker
might be able to "hide" activity by forcing the ram disk to fail or...
 I wouldn't go down this route unless the other two have already
failed miserably.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux