Re: Log files

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

 



Mark Bomgardner wrote:
> I am writing an application in which I want to create log files.  I am
> weighing the difference between using text files and using a database to
> house the data.  It appears to me that there is really no advantage either
> way or is there?  There are pros and cons to both methods, but I am
> concerned about opening and closing a text file some many times that it may
> cause and issue. The file may be opened and closed 1,000 or more times a
> day.

Opening/closing a file that number of times won't cause a problem, 1,000
 isn't a lot a day. If you needed to write something 1,000 times a
minute, you probably couldn't do that with a file without getting into
contention/locking issues.

What will you do with the logs once you have them?

Do you need to run reports based on the data in them?
Will you need to search for information in the logs?

If you need to run reports or search for info in the logs, I'd use a
database.

If you just need the logs for "Person A logged in at this time" type
messages then a file should be fine.

-- 
Postgresql & php tutorials
http://www.designmagick.com/

-- 
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