A nice use case would be to have logrotate run goaccess before rotating the nginx logs. Correct me if I'm wrong, but there's currently no way to tell goaccess to just process the log files and exit when done. A --process-and-exit option would be nice. This would also alleviate the problem with #334, as log files would always be processed exactly once for this specific use case.
If you are outputting to a terminal, there's no way to right now to exit goaccess after parsing the log. However, if you are outputting to an html file (w/o real-time), it will parse it and goaccess will exit.
I agree that running goaccess right before rotating the log should alleviate the issue of parsing the same log twice. Are you outputting to the terminal and thus you are suggesting --process-and-exit?
不, 我现在不在任何地方输出。我要做的是处理日志输入数据库中的行并退出, 这样我就可以删除/存档日志, 但以后仍然打开 goaccess (从 db 加载), 并查看日志中的行的分析。
我想我可以输出一个 html 文件/开发/空或作为一种变通办法, 但。
No, I'm not outputting anywhere now. What I want to do is process the log to enter the lines in the database and exit, so I can delete/archive the log but still open goaccess later (loading from the db) and see the analysis of the lines in the log.
I guess I can output an html file to /dev/null or something as a workaround, though.