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 sending to graylog #56

Open
iurydias opened this issue Aug 11, 2022 · 2 comments
Open

Not sending to graylog #56

iurydias opened this issue Aug 11, 2022 · 2 comments

Comments

@iurydias
Copy link

Hey,

I was trying to create a syncronous hook with no compression and it simply not send to graylog, it just work with assyncronous.

obs: I'm using v3.

graylogHook = graylog.NewGraylogHook(graylogURL, extra)
w := graylogHook.Writer();
if writer, ok := w.(*graylog.UDPWriter); ok {
    writer.CompressionType = graylog.NoCompress
    _ = graylogHook.SetWriter(writer)
}
@gravis
Copy link
Member

gravis commented Aug 26, 2022

@iurydias if you change the compression type, a new writer is needed:

// . If compression settings have changed, a new writer is required.

@iurydias
Copy link
Author

iurydias commented Sep 8, 2022

@gravis how should I do that? Doing SetWriter() isn't enough, as I did?

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