TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Logparser – Alternative to GoAccess Written in Python

54 pointsby lcnmrnover 3 years ago

9 comments

jerfover 3 years ago
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 未加载
vsajipover 3 years ago
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?
simonwover 3 years ago
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 未加载
eatonphilover 3 years ago
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 未加载
Svetlitskiover 3 years ago
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>
euover 3 years ago
To be fair, GoAccess does a bit more (is has that websockets live view)
评论 #28629974 未加载
makapufover 3 years ago
Im not sure its an alternative yet, functionally it seems that it misses incremental parsing, live updates, interactive html and tui interfaces, graphs,...
patjaover 3 years ago
Seems like a confusing name given that logparser for IIS log files has been around for a very long time.
cssover 3 years ago
IMO this could benefit from using `collections.Counter` instead of `defaultdict(set)`.
评论 #28631058 未加载