Conversation
Make it clear in code storing logs that chunks must be split at newlines. Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
juliangruber
left a comment
There was a problem hiding this comment.
I don't think this is the way to go. While I agree the needs a refactor to prevent regressions, I think the fault lies inside the abstraction. To me, the library is still for logs (it's an implementation detail whether it's storing individual lines or not). Then, I see too ways to make it safer:
a) Change the method names to Logs#pushLine() and Logs#getLastLines()
b) Inside Logs#push(), split strings on newlines, so that whatever can be pushed to it
What do you think?
👍🏻
I did consider this option, too, and I am happy to adopt it.
This goes beyond a simple cleanup, it will require a bit more work & testing, which I don't have appetite for right now. |
Go for it! 🙏 |
|
Closing in favour of #1325 |
Make it clear in code storing logs that chunks must be split at newlines.
My intention is to prevent regressions like the one fixed by #1319.