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

Hooks with external logging services (loggly) #42

Closed
GeertJohan opened this issue Jan 7, 2015 · 5 comments
Closed

Hooks with external logging services (loggly) #42

GeertJohan opened this issue Jan 7, 2015 · 5 comments

Comments

@GeertJohan
Copy link

First of all, thanks for creating this great logging package. I've looked at all the popular packages out there and I definitly like this one best!

I've created a very simple Handler/hook that sends logs to loggly. It depends on github.com/segmentio/go-loggly. Do you think handlers like these should just have their own repository, or could we include them in this repository?

I think the package should at least have its own package to avoid downloading the go-loggly dependency when go get-ing log15. Maybe it could be something like github.com/inconshreveable/log15/hooks/logglyhook. Name it logglyhook to avoid naming conflict because the user also needs to be importing go-loggly to create the hook.

Here's a gist of how the code looks right now: https://gist.github.com/GeertJohan/6214d2e04957610235ad

Cheers!

@GeertJohan
Copy link
Author

instant update: I've changed the code a bit, NewLogglyHook now takes the loggly token directly.
https://gist.github.com/GeertJohan/3d83e85f6e028dcea832

This means the package can be named github.com/inconshreveable/log15/hooks/loggy and users dont have to import go-loggy to setup the loggly client.

@GeertJohan
Copy link
Author

Any update on this?

@ChrisHines
Copy link
Collaborator

@GeertJohan It would seem this issue falls under the umbrella of issue #5, which suggests it should go in the ext package, but I agree with you that the dependency on go-loggly should be isolated.

If we do accept this into the log15 repo I would vote for it to go in log15/ext/loggly.

@GeertJohan
Copy link
Author

I'll provide a PR shortly.

@GeertJohan GeertJohan changed the title Hooks with external logging services Hooks with external logging services (loggly) Jan 22, 2015
@GeertJohan
Copy link
Author

#44 is ready and can be merged.

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