goaccess icon indicating copy to clipboard operation
goaccess copied to clipboard

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

Open rc5hack opened this issue 1 year ago • 2 comments

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?

rc5hack avatar Mar 13 '24 09:03 rc5hack

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?

allinurl avatar Mar 28 '24 00:03 allinurl

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! ;)

0bi-w6n-K3nobi avatar Apr 20 '24 21:04 0bi-w6n-K3nobi