Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are logs stored in flat files, rather than a database (SQL)?

Why is it that web servers and other technology use flat files for logging, rather than a database of some sort, whether it by SQL or some sort of KVS or "NoSQL" solution?

Is there a benefit (speed, latency, write-times, etc) to using flat files, or am I simply missing something?

like image 523
Mike Trpcic Avatar asked Feb 25 '11 03:02

Mike Trpcic


1 Answers

You're not guaranteed to have a DB on the server.

If the DB is part of the problem, how do you look at the logs.

If the DB is not part of the problem, it's still simpler to look at the logs with any old text editor.

Why use complicated when simple works. When Apache (etc.) was first developed, Open source (free, ubiquitous) DBs were not as available.

Etc. Etc.

like image 120
MickeyfAgain_BeforeExitOfSO Avatar answered Oct 08 '22 06:10

MickeyfAgain_BeforeExitOfSO