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

What purpose of using hijack mode? #6

Closed
vagruchi opened this issue May 3, 2017 · 3 comments
Closed

What purpose of using hijack mode? #6

vagruchi opened this issue May 3, 2017 · 3 comments

Comments

@vagruchi
Copy link
Contributor

vagruchi commented May 3, 2017

Saw some changes in repository. Can't understand purpose of using fixed notation for configuring and hijack mode.

@xujinzheng
Copy link
Member

It will more scalability, you could create new logger by logrus.New(), then use config to hijack it, then the new logger's config will be set, and the logger also could be hijack more than once, if your env changed, you just hijack again, then the config will take effect.

the hijack mode also could hijack logrus.StandardLogger(), then we could use logurs.XXXX for print errors, if we want change the logger's config, just hijack logrus.StandardLogger() again.

@vagruchi
Copy link
Contributor Author

vagruchi commented May 4, 2017

Ok. But can we use another string format for configure logger? (For example: TOML)
In previous versions for configuring we use struct. This struct could be filled by reflection.
Now I can't see ways to do it.

@xujinzheng
Copy link
Member

my latest commit are support customize config provider.

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

2 participants