如果想在调试应用程序或日志文件中记录信息,这样处理是非常合适的。
If you want to log a message to a debugging application or log file, that's suitable.
确保你的日志能回答这样的问题。
首先写入日志,然后再写入数据库,这样做的最大好处在于,所有日志文件写入操作本质上都是按顺序进行的。
The biggest benefit of writing to the log first, then writing to the database is that all writes to log files are sequential in nature.
应用推荐