allinurl / goaccess

GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
https://goaccess.io
MIT License
17.78k stars 1.09k forks source link

"Log Size" reports "0 Byte" when parsing from stdin #2644

Open rc5hack opened 3 months ago

rc5hack commented 3 months ago
goaccess /path/to/logfile --log-format=COMBINED --output /path/to/report.html

In this case "Log Size" in report shows the size of logfile (at the point in time when the log was last parsed).

cat /path/to/logfile | goaccess --log-format=COMBINED --output /path/to/report.html -

In this case (unlike the first example) "Log Size" in report shows zero.

Should it show parsed stdin size instead?

allinurl commented 3 months ago

This can get a bit tricky as one could run it as:

# cat /path/to/logfile | goaccess --log-format=COMBINED --output /path/to/report.html - /path/to/otherlog /path/to/someother

One potential enhancement could be to display the log files being parsed within the generated HTML report, similar to how they are displayed in the terminal output. Thoughts?

0bi-w6n-K3nobi commented 2 months ago

Hi @allinurl I remember that did implement this in some old version. Just a patch for myself.

I think this is no hard. Exist one point in code that sum is made. So, it is simple change for point where line was read. Humm... but lines that really not been yet processed.

Well.. for now, I need check for that because we have multi-threading in code! ;)