Closed alexellis closed 2 years ago
In an older PR #107 the code changed to s, err := reader.ReadString('\n')
, but it's not explained why that change was made.
This PR appears to resolve the issue and retain compatibility with the existing behaviour.
Resolved your requests @LucasRoesler. If you can think of a simpler and easier to read test than that in #107 then perhaps we could add it at a later time.
cc @chrisrichard @voziv from RateHub
Signed-off-by: Alex Ellis (OpenFaaS Ltd) alexellis2@gmail.com
Description
Allow for very long log lines
Motivation and Context
With this environment-variable (log_buffer_size), very large logs can be scanned and printed out to stdio.
This was reported by RateHub (an OpenFaaS Pro) user, but has also been worked on several times in the past.
cc @LucasRoesler @everesio @ghostbody
Fixes #105 #100 Closes #99 #107
How Has This Been Tested?
Tested with a 5MB JSON file and a Node.js process that printed the value to console.log/console.error.
It worked as expected. After reducing the value to the default, an error was returned.
Types of changes
Checklist:
git commit -s