将服务器日志文件写入数据库是个好主意吗? [英] Is writing server log files to a database a good idea?
本文介绍了将服务器日志文件写入数据库是个好主意吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在阅读有关O主题的文章后,
After reading an article about the subject from O'Reilly, I wanted to ask Stack Overflow for their thoughts on the matter.
推荐答案
在本地写入磁盘,然后批量插入数据库(例如在日志翻转时间)。在单独的低优先级流程中执行此操作。更高效,更强大...
Write locally to disk, then batch insert to the database periodically (e.g. at log rollover time). Do that in a separate, low-priority process. More efficient and more robust...
(确保您的数据库日志表包含一个日志事件来自哪台机器列 - 非常方便!)
(Make sure that your database log table contains a column for "which machine the log event came from" by the way - very handy!)
这篇关于将服务器日志文件写入数据库是个好主意吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文