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

Not able to add additional zapcores to flogo logger #32

Open
nareshkumarthota opened this issue Feb 8, 2019 · 1 comment
Open

Not able to add additional zapcores to flogo logger #32

nareshkumarthota opened this issue Feb 8, 2019 · 1 comment

Comments

@nareshkumarthota
Copy link

nareshkumarthota commented Feb 8, 2019

Current behavior:
No provision to add additional zapcore (like syslog zap core implementation) to flogo logger

Expected behavior:
Provision to add additional zapcores into flogo root logger.

What is the motivation / use case for changing the behavior?
Would like to add syslog support to the flogo logger.

Additional information you deem important (e.g. I need this tomorrow):
Couldn't able to inject syslog zap core into flogo logger with the flogo provided API, I ended up in refactoring flogo/core logger related files and same is available in my fork.

@nareshkumarthota
Copy link
Author

Changes included:

  1. Creation of new packages zapcores and zapconfig.
    zapcores: contains all registerd cores.
    zapconfig: contains default configuration and log level.
  2. Refactoring existing zap.go such that before root logger creation all the available cores are appended together.

Example Usage:

  1. User has to create zapcore implimentation. Sample syslog implimentation can be seen here.
  2. User need to add the above created impl package to the first un used import.

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