Reputation: 31
I'm talking about human-readable text logging, like error messages from a web application.
Do people commonly store these in a database? Are there any advantages to using a database table instead of a file? Or if not, why is it specifically a bad idea?
Upvotes: 3
Views: 6633
Reputation: 5479
Advantages:
Some disadvantages:
Major advantages
Disadvantages
There's nothing inherently right or wrong with logging to a database versus logging to a file; it all depends on your needs. Think through your needs, then decide. Logging to a database is very convenient when debugging, but it might require more of you, your team or your application in the long run.
Upvotes: 4
Reputation: 26
I hope this link gives you a better idea - What's more efficient - storing logs in sql database or files?
Log to db instead if you need other people needs to read logs in a web interface or if you need the ability to search through logs
Upvotes: 1