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

When to call function close in graylog handler? #65

Open
halink0803 opened this issue Jul 26, 2018 · 1 comment
Open

When to call function close in graylog handler? #65

halink0803 opened this issue Jul 26, 2018 · 1 comment
Labels

Comments

@halink0803
Copy link

Hi, I am really interested in apex/log because of its built in handler to support many different logger and services. However, I don't see an example for using graylog handler. I tried to implement it myself and it works (perfectly). However, I wonder there is a Close function in the handler and I don't know when to call it?

func (h *Handler) Close() error {

Can you provide a full example of using graylog handler and specify using of Close function.

Best regards,

@tj
Copy link
Member

tj commented Jul 26, 2018

Good question, that one was contributed, but it looks like you can just Close() when your application is shutting down to flush the remaining logs:

https://github.com/aphistic/golf/blob/master/client.go#L119

@tj tj added the question label Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants