Is writing server log files to a database a good idea?

后端 未结 6 1993
臣服心动
臣服心动 2020-12-02 10:44

After reading an article about the subject from O\'Reilly, I wanted to ask Stack Overflow for their thoughts on the matter.

6条回答
  •  天涯浪人
    2020-12-02 11:17

    I'd say no, given that a fairly large percentage of server errors involve problems communicating with databases. If the database were on another machine, network connectivity would be another source of errors that couldn't be logged.

    If I were to log server errors to a database, it would be critical to have a backup logger that wrote locally (to an event log or file or something) in case the database was unreachable.

提交回复
热议问题