发表文章

[C#] 功能要求: 处理后退出。 Feature request: Quit after processing.[goaccess]

skorokithakis 2017-10-9 81

一个很好的用例是在旋转 nginx 日志之前 logrotate 运行 goaccess。纠正我, 如果我错了, 但目前没有办法告诉 goaccess 只处理日志文件和退出时完成。--process-and-exit选项将很好。这也会缓解#334的问题, 因为对于这个特定的用例, 日志文件总是只处理一次。

原文:

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.

相关推荐
最新评论 (5)
allinurl 2017-10-9
1

如果您要输出到终端, 那么现在就无法在分析日志后退出 goaccess。但是, 如果您要输出到一个 html 文件 (real-time), 它将解析它, goaccess 将退出。

我同意, 在旋转日志之前运行 goaccess 就可以缓解两次解析同一日志的问题。您是否正在输出到终端, 因此您建议 --process-and-exit

原文:

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?

skorokithakis 2017-10-9
2

不, 我现在不在任何地方输出。我要做的是处理日志输入数据库中的行并退出, 这样我就可以删除/存档日志, 但以后仍然打开 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.

allinurl 2017-10-9
3

明白了。我已经添加了此选项, 它现在应该分析给定的日志并退出。请随时从开发生成, 否则它将在即将发布的版本中被推出。谢谢!

原文:

Got it. I've added this option, it should now parse the given log and exit. Feel free to build from development, otherwise it will be pushed out in the upcoming release. Thanks!

skorokithakis 2017-10-9
4

太棒了谢谢是否还可以对#334进行注释?

原文:

Fantastic, thank you! Could you also comment on #334?

allinurl 2017-10-9
5

我肯定会对#334进行评论, 只是让我再考虑一下您提出的解决方案。

原文:

I'll definitely comment on #334, just let me think a bit more about the solution you proposed.

返回
发表文章
skorokithakis
文章数
5
评论数
15
注册排名
42250