TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Logparser – Alternative to GoAccess Written in Python

54 点作者 lcnmrn超过 3 年前

9 条评论

jerf超过 3 年前
I am skeptical of those benchmarks. This is written in Python, and, looking at the core loop, yes, it really is Python, not Python wrapped around C or some other acceleration technology. For pure Python to come out appearing to get four times the through put of a C program is pretty dubious. That would have to be one crappy C program. GoAccess looks like it ought to be far enough along that somebody has at least taken a bit of a crack at optimization, but, perhaps not. C ought to be able to smoke pure Python at this task. (Possibly, you know, <i>unsafely</i>, where a crafted referrer may get to arbitrary code execution or something, but still it ought to be <i>way faster</i>.)
评论 #28630404 未加载
评论 #28630541 未加载
vsajip超过 3 年前
The license is currently just<p><pre><code> All rights reserved. Copyright (c) 2020 Lucian Marin </code></pre> It was the MIT license at the time of initial commit, and been updated to this. So it&#x27;s not immediately clear if anyone else can necessarily use Logparser - care to clarify, Lucian?
simonw超过 3 年前
Suggestion: take the time to package this up for PyPI as something people can install using &quot;pip install&quot; (or &quot;pipx install&quot;).<p>This is hard the first time you do it, but worth learning because it&#x27;s a really great way to distribute your Python software.<p>I&#x27;m giving a talk about how to do this at PyGotham next month, but the notes from that talk are already available and may be useful to you: <a href="https:&#x2F;&#x2F;github.com&#x2F;simonw&#x2F;pygotham-packaging" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;simonw&#x2F;pygotham-packaging</a><p>You may also find this cookiecutter template that I use to build and package Python CLI apps helpful: <a href="https:&#x2F;&#x2F;github.com&#x2F;simonw&#x2F;click-app" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;simonw&#x2F;click-app</a>
评论 #28631590 未加载
eatonphil超过 3 年前
On a tangent, I&#x27;ve been looking into log parsing for an application I&#x27;m building recently.<p>If you want to support pulling info out of common logs it&#x27;s pretty simple to pull together a list of regexes for the default log format in each major system. Simple example here: <a href="https:&#x2F;&#x2F;github.com&#x2F;multiprocessio&#x2F;datastation&#x2F;blob&#x2F;master&#x2F;shared&#x2F;text.ts#L13" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;multiprocessio&#x2F;datastation&#x2F;blob&#x2F;master&#x2F;sh...</a>.<p>I use this in the app to be able to quickly pull info out of access logs for further analysis a la OP&#x27;s app and GoAccess but in a GUI where you can also do further processing.<p>Demo video of this here: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=sCx2mF2jyUQ&amp;t=9s" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=sCx2mF2jyUQ&amp;t=9s</a>.
评论 #28630666 未加载
Svetlitski超过 3 年前
Are you certain your benchmarks are correct? The GoAccess FAQ states that it parses over 100,000 lines&#x2F;second [1]. While this figure depends on the hardware used, this still is <i>massively</i> faster than the figure quoted in the README. Benchmarking is quite technical if you want consistent results, so some more information on the benchmarking methodology used here would be much appreciated.<p>[1] <a href="https:&#x2F;&#x2F;goaccess.io&#x2F;faq#performance" rel="nofollow">https:&#x2F;&#x2F;goaccess.io&#x2F;faq#performance</a>
eu超过 3 年前
To be fair, GoAccess does a bit more (is has that websockets live view)
评论 #28629974 未加载
makapuf超过 3 年前
Im not sure its an alternative yet, functionally it seems that it misses incremental parsing, live updates, interactive html and tui interfaces, graphs,...
patja超过 3 年前
Seems like a confusing name given that logparser for IIS log files has been around for a very long time.
css超过 3 年前
IMO this could benefit from using `collections.Counter` instead of `defaultdict(set)`.
评论 #28631058 未加载