Click to See Complete Forum and Search --> : table for logs


fireblade
07-06-2009, 08:39 AM
I am working on an application that need to be write the logs on each actions.
Datas will grow in to huge amount coz I need the data to be written more oftena and for small actions.
Is it good idea to write them on a SQL table or a flat file? Will there be any performance issue when data loads to table?

svidgen
07-06-2009, 10:19 AM
Using a DBMS is generally the better choice. However, if you're the data all needs to be accessed together by a single user with no need for complex or conditional sorting or searching, there may be some justification for using a flat file.

svidgen
07-06-2009, 10:21 AM
Oh ... that being said, logging is generally done using a flat file and a logging daemon. What programming/scripting language are you using?

fireblade
07-06-2009, 11:00 AM
Oh ... that being said, logging is generally done using a flat file and a logging daemon. What programming/scripting language are you using?

Yes, I use PHP for the current project.

svidgen
07-06-2009, 11:12 AM
I suggest using the system logger: http://php.net/manual/en/function.syslog.php