Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

日志类性能低 #6

Open
hansedong opened this issue Sep 7, 2015 · 2 comments
Open

日志类性能低 #6

hansedong opened this issue Sep 7, 2015 · 2 comments

Comments

@hansedong
Copy link

日志类,通常会大量写log日志。但是你的wirte方法,直接就error_log,这样有2个问题
1、磁盘IO太大。
2、单服务器上,并发大的时候,会造成日志记录流混乱。在查日志的时候不容易定位问题。
可以参考Yii的日志处理方式来完善。

@zhuli
Copy link
Owner

zhuli commented Sep 7, 2015

非常感谢

@lloydzhou
Copy link

@donghongshuai
这里有一个日志的实现,使用register_shutdown_function来一次性的写入log,应该性能会好点。不过不适合长时间执行的任务记录log
https://github.com/bephp/logger/blob/master/logger.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants