logtail / logback-logtail

Better Stack Java Logback appender
https://betterstack.com/logs
MIT License
17 stars 4 forks source link

Batch log forwarding #4

Closed cosmin-marginean closed 2 years ago

cosmin-marginean commented 2 years ago

It's essential to send the log messages periodically in a batch. I presume queueSize does that but it doesn't seem to work as expected (one for https://github.com/logtail/logback-logtail/issues/3). It's too much to issue an HTTP request on each log message which is what seems to happen now, more or less.

gyfis commented 2 years ago

@cosmin-marginean Hi Cos! You're right, currently our appender sends each log individually. That's a great feature request! I'm adding this to our internal issue tracking and the team will look into it. We also accept contributions, if you'd like to take a shot at implementing this!

cosmin-marginean commented 2 years ago

Thanks! I wrote a first version for this, can I get permission to open a PR?

gyfis commented 2 years ago

@cosmin-marginean Definitely! You should be able to create a fork and submit a PR from there. Let me know if that doesn't work!

cosmin-marginean commented 2 years ago

Great, done this here: https://github.com/logtail/logback-logtail/pull/5

gyfis commented 2 years ago

@cosmin-marginean Hi Cos, thanks a lot for the PR! I released a new package (0.1.1) with the code - let me know if there's anything else left to be done on this issue. Thanks!