-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Omitting client.Stop() prevents logs being pushed to loki server #15
Comments
I cloned the branch and created the following test
When I omit the
Is this behaviour expected? |
If i remember well, the loki client put logs into a buffer and send a batch regularly. Calling If you remove this line, some logs might be dropped on exit. |
at the moment none of the messages are being pushed. I wonder if my buffer is set too large somehow? I will investigate this further and post updates here in case others run into similar problems. |
Hello
I managed to get logs pushed to my loki grafana setup (with some trial and error) and I was wondering if it is necessary to call
client.Stop()
in order for the logs to be pushed to the loki server?`func SetDefaultLogger() {
url := "http://localhost:3100/loki/api/v1/push"
}`
If I remove the line
defer client.Stop()
I don't see the messages in Grafana.The problem for me is that my application will hang if the client is stopped and I try and call the default logger elsewhere in the code.
Is there a way I can set this default logger without having to call client.Stop()
The text was updated successfully, but these errors were encountered: