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
Say out pager's buffer has a size of 10 and a width of 5 chars we are able to store 10 lines each 5 chars long (not 10 items as an item's data might take up more then one line) and display these 10 lines in the pager.
Now a log is streams which is a single line with > 10*5 chars scotty panics when writing the lines into the buffer since it writes more then 10 lines into the [10]string array.
What should happen?
Since the log line wrapped will not fit into the current view and we cannot stop writing the wrapped lines once the buffer is full we need to cut of the beginning of the wrapped line.
Example:
pager: size: 4 width 2
-> each of the 4 lines can hold 2 chars
input -> 0123456789
wrapped -> 01 | 23 | 45 | 67 | 90 -> wrapping the input based on the width 2 results in 5 lines
buffer should at the end look like so: [23, 45, 67, 89] notice that the one line which is too much is cut-off at the beginning.
Another approach could be to limit the numbers of wrapped lines to N and if len(lines) > N show up to N lines with an indication that the further lines have been truncated. This could also be an solution since the complete log line can be view in browsing mode.
The text was updated successfully, but these errors were encountered:
Say out pager's buffer has a size of 10 and a width of 5 chars we are able to store 10 lines each 5 chars long (not 10 items as an item's data might take up more then one line) and display these 10 lines in the pager.
Now a log is streams which is a single line with > 10*5 chars scotty panics when writing the lines into the buffer since it writes more then 10 lines into the [10]string array.
What should happen?
Since the log line wrapped will not fit into the current view and we cannot stop writing the wrapped lines once the buffer is full we need to cut of the beginning of the wrapped line.
Example:
pager: size: 4 width 2
-> each of the 4 lines can hold 2 chars
input -> 0123456789
wrapped -> 01 | 23 | 45 | 67 | 90 -> wrapping the input based on the width 2 results in 5 lines
buffer should at the end look like so: [23, 45, 67, 89] notice that the one line which is too much is cut-off at the beginning.
Another approach could be to limit the numbers of wrapped lines to N and if len(lines) > N show up to N lines with an indication that the further lines have been truncated. This could also be an solution since the complete log line can be view in browsing mode.
The text was updated successfully, but these errors were encountered: