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

全局变量支持灵活prefix #13

Open
ianwoolf opened this issue Dec 16, 2016 · 1 comment
Open

全局变量支持灵活prefix #13

ianwoolf opened this issue Dec 16, 2016 · 1 comment

Comments

@ianwoolf
Copy link

ianwoolf commented Dec 16, 2016

如果直接调用package的全局变量打log,目前只能支持一个全局prefix,但是可能在多个package打印log,需要多个prefix。

如果给formatHeader传入一个可选参数prefix,可以支持全局变量打多个prefix
https://github.com/lodastack/log/blob/master/log.go#L153)

可以考虑下是否支持

@ianwoolf
Copy link
Author

或者去掉全局的SetPrefix,不给全局log设置prefix。(建议有需求的new自己的log对象)

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

1 participant