I am working on a web based application to tail log file. I set a chunksize of 16384 and startPosition 5. My log file is around 38 MB in size and the browser hangs as soon as I do so. I am using Jetty and Primefaces.
When I click the server, the text area displaying log content gets filled up with way more data than expected.
int displayChunkSize = 16384 :
long fileSize = path.toFile().length();
long startPos =5;
Observable<String> tailer = FileObservable
.tailer()
.file( path.toFile().getAbsolutePath() )
.sampleTimeMs( 500 )
.chunkSize( displayChunkSize )
.startPosition( startPos)
.tailText();
SafeSubscriber safeSub = new SafeSubscriber(new ActionSubscriber(
onMessage, onError, Actions.empty() ) );
Runnable sub = () -> tailer.subscribe( safeSub );
I am working on a web based application to tail log file. I set a chunksize of 16384 and startPosition 5. My log file is around 38 MB in size and the browser hangs as soon as I do so. I am using Jetty and Primefaces.
When I click the server, the text area displaying log content gets filled up with way more data than expected.