You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I was implementing the other changes I noticed monolog supports batch mode
And the logdna formatter, although it accepts batch mode parameter, there is no way to make the logdna handler+formatter actually perform batch mode.
I think it is doable, but it would probably require to move part of the logic from formatter into the handler
specifically, now the formatter returns lines array of just 1 line - it would have to instead just return that one line
and the handler would be responsible to send 1 line in normal mode, and many lines in batch mode in a single request.
This could break code for anyone who instantiates manully or extends the LogdnaFormatter.
Do you think it's worth investigating further? It's not like I'm in need of that feature right now, maybe one day... But I just noticed this while digging in the code and it made me thinking maybe the current implementation of LogdnaFormatter is not exactly what monolog intends for the implementations to be...
The text was updated successfully, but these errors were encountered:
Probably. For example the ingestion api of logdna itself can handle multiple records in a single request and there must be others.
Do you have a link to documentation
Well after brief search I didn't find much except for the BufferHandler and OverflowHandler from monolog https://github.com/Seldaek/monolog/blob/main/doc/02-handlers-formatters-processors.md
but there's not much doc except for looking at the code. Maybe the batch mode isn't a very spread feature or I haven't looked good enough (I havent :))...
Anyway, I'm not sure it needs be implemented, unless someone wants it.. I don't rn, as I said, it's just something that occured to me during the other changes and something to consider for future...
Hi,
While I was implementing the other changes I noticed monolog supports batch mode
And the logdna formatter, although it accepts batch mode parameter, there is no way to make the logdna handler+formatter actually perform batch mode.
I think it is doable, but it would probably require to move part of the logic from formatter into the handler
specifically, now the formatter returns
lines
array of just 1 line - it would have to instead just return that one lineand the handler would be responsible to send 1 line in normal mode, and many lines in batch mode in a single request.
This could break code for anyone who instantiates manully or extends the LogdnaFormatter.
Do you think it's worth investigating further? It's not like I'm in need of that feature right now, maybe one day... But I just noticed this while digging in the code and it made me thinking maybe the current implementation of LogdnaFormatter is not exactly what monolog intends for the implementations to be...
The text was updated successfully, but these errors were encountered: