What's more efficient - storing logs in sql database or files?

后端 未结 9 1498
暗喜
暗喜 2020-12-15 03:30

I have few scripts loaded by cron quite often. Right now I don\'t store any logs, so if any script fails to load, I won\'t know it till I see results - and even when I notic

9条回答
  •  [愿得一人]
    2020-12-15 03:46

    Error logging is best limited to files in my opinion, because if there is a problem with the database, you can still log that. Obviously that's not an option if your error logging requires a connection to the database!

    What I will also say however, is that general logging is something I leave within the database, however this only applies if you are doing lots of logging for audit trails etc.

提交回复
热议问题