[GH-ISSUE #190] Option to change _linesLimit on browser side #125

Open
opened 2026-03-03 16:04:38 +03:00 by kerem · 1 comment
Owner

Originally created by @Rom1deTroyes on GitHub (Dec 11, 2019).
Original GitHub issue: https://github.com/mthenw/frontail/issues/190

When I get back to my browser after a night of log scrolling, only the 2000 last line are present, so the logs between 18:30 and 23:00 where lost.

In app.js we got :

 var _linesLimit = Math.Infinity;

redefined in init() by :

_socket
        .on('options:lines', function(limit) {
          _linesLimit = limit;
        })

And the first line is removed if we reach the limit in the log() function :

      if (_logContainer.children.length > _linesLimit) {
        _logContainer.removeChild(_logContainer.children[0]);
      }

On my system (Firefox Developper Edition 71.0b5 (64 bits) on Win10), Math.Infinity is undefined

>> Math.Infinity
<- undefined

But _linesLimit is set to 2000 by the socket.io init stuff :
image

As I don't have access to the server side of frontail, but my desktop is capable to display billions of lines, is there a way to change this behaviour without hacking ?

Originally created by @Rom1deTroyes on GitHub (Dec 11, 2019). Original GitHub issue: https://github.com/mthenw/frontail/issues/190 When I get back to my browser after a night of log scrolling, only the 2000 last line are present, so the logs between 18:30 and 23:00 where lost. In app.js we got : ```JS var _linesLimit = Math.Infinity; ``` redefined in init() by : ```JS _socket .on('options:lines', function(limit) { _linesLimit = limit; }) ``` And the first line is removed if we reach the limit in the `log()` function : ```JS if (_logContainer.children.length > _linesLimit) { _logContainer.removeChild(_logContainer.children[0]); } ``` On my system (Firefox Developper Edition 71.0b5 (64 bits) on Win10), `Math.Infinity` is undefined ``` >> Math.Infinity <- undefined ``` But _linesLimit is set to 2000 by the socket.io init stuff : ![image](https://user-images.githubusercontent.com/8625432/70616108-065b7b80-1c0e-11ea-9009-195764eaf772.png) As I don't have access to the server side of frontail, but my desktop is capable to display billions of lines, is there a way to change this behaviour without hacking ?
Author
Owner

@mthenw commented on GitHub (Apr 13, 2020):

As I don't have access to the server side of frontail, but my desktop is capable to display billions of lines, is there a way to change this behaviour without hacking ?

I don't think so. Changing this in the frontend is tricky. I will mark it as a feature.

<!-- gh-comment-id:613047518 --> @mthenw commented on GitHub (Apr 13, 2020): > As I don't have access to the server side of frontail, but my desktop is capable to display billions of lines, is there a way to change this behaviour without hacking ? I don't think so. Changing this in the frontend is tricky. I will mark it as a feature.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/frontail#125
No description provided.