-
Notifications
You must be signed in to change notification settings - Fork 5
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
LogLevelToName are exported,Flags support #3
Conversation
LogLevelToName are exported,Flags support
LogLevelToName are exported for setting name of log level. append logger.Flags field for setting log flag; defaults to log.LstdFlags.
LogLevelToName are exported for setting name of log level. append logger.Flags field for setting log flag; defaults to log.LstdFlags.
Thanks for your pull request! A few questions:
One big problem I see here is that the user has to know how the flags are defined in the standard log package while they are actually using a totally different log facility. They are supposed to use an eaiser-to-use log package but it ends by forcing users to learn stuffs from two packages. i.e. they have to know what |
If you want to make a contribution to this package, I do see a problem with it. Any log operation is not actually concurrent safe. You may want to add a lock to the |
你好 monnand.
当然,这些官方包的 正如你所说,抱歉,我只想到开放这个Flags,忘记写操作接口了. 并发的问题,应该不是问题,这就是我认为这个log设计的比较妙的地方,因为并发可以在 |
the code of this pull has problems. |
原日志写规则是小于设定的 level 会被写日志, 新增等于level写日志支持
@monnand 你好
如果这些调整不会和 |
抱歉,忘记说了 |
@achun 不好意思,最近比较忙,一直没来得及回复。鉴于你一次做了三处修改,我不太好全部都加进去。因为有些我觉得还有待讨论,或者需要修改一些接口。 如果方便,能不能把这三处修改分别做成三个pull request,这样我们方便讨论,也可以及早merge一些修改。 |
@monnand
这3项调整,1是独立的,2,3是有顺序的,3基于2. 我感觉 1 可以先放放, 2优先讨论比较合适.稍候我,pull一个版本 |
抓狂了, 不知道怎么回事, 我那个版本 go get 出来的 HEAD总是指向 fork 最初的位置 |
新的pull已经提交 |
LogLevelToName are exported for setting name of log level.
append logger.Flags field for setting log flag; defaults to log.LstdFlags.