且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

您登录到数据库,当数据库关闭时您在哪里登录?

更新时间:2022-11-25 07:48:46

通常,如果无法连接到数据库,则登录到文件系统是一个很好的选择.同时点击不成问题(锁定...).如果您已经有适合数据库的日志,那么最简单的方法就是使用sqlite作为后备.

Generally, logging to the file system is a good fall back if you can't connect to your database. Simultaneous hits shouldn't be a problem (locks...). If you already have your logs adapted for a database perhaps the easiest way to go would be to use sqlite as a fall back.

在这种情况下,另一种方式是通过电子邮件发送日志事件,除了不丢失事件外,这种方法还应该使您更快地意识到数据库问题.

Another way would be to email log events in this case, in addition to not loosing them this approach should make you aware of your database problem faster.