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

Remove auto reload feature in zlog 2.0 ? #34

Open
HardySimpson opened this issue Jul 25, 2013 · 3 comments
Open

Remove auto reload feature in zlog 2.0 ? #34

HardySimpson opened this issue Jul 25, 2013 · 3 comments

Comments

@HardySimpson
Copy link
Owner

Auto reload is a good feature.
It make people spend less time on when zlog reloads its config file.

In zlog 1.2, auto reload is controlled by logging count. Each time when zlog_xxx() is called, this count add one, util reach the reload point.

In zlog 2.0, I considered make time as the reload flag. But the problem is, the time is fetched by log action which calls gettimeofday(). If there is no rules or formats need to output time, gettimeofday() will not be called and there will be no time. Then I can't know whether the time reach the reload point...

So the trade off of performance and feature comes again?

Should I give up the auto reload feature, to make everything clear?
Or should I call gettimeofday() in every zlog_xxx() function? which will make log without time slow but keep the auto reload feature.

Thanks for any ideas, or any other advice or opinion for zlog 2.0.

@szhem
Copy link

szhem commented Jul 27, 2013

Hello, I'm using zlog for one of my projects, and its a wonderful logging library.
I suppose, automatic reloading should be switched off, as it can be implemented easily with SIGHUP signal.

@lisongmin
Copy link

自动加载配置没有必要,当配置变更时,由应用程序手动调用重新加载配置的接口就可以了。

@HardySimpson
Copy link
Owner Author

好的,谢谢大家的建议,看来我的确提供了“脑补的特性”,在这一版可以去掉了

OK, thanks everyone, It seems that I do provide useless feature. It will be removed in zlog 2.0

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