Show HN: A Better Log Service

txtlog.net

147 points by williebeek 2 days ago


Hello everyone, there are many log services available and this is my attempt at a better one.

Most online logging tools feature convoluted UIs, arbitrary mandatory fields, questionable AI/insights, complex pricing, etc. I hope my application fixes most of these issues. It also has some nice features, such as automatic Geo IP checks and public dashboards.

Although I've created lots of software, this is my first open source application (MIT license), the tutorial for selfhosting is hopefully sufficient! Most of my development career has been with C#, NodeJS and PHP. For this project I've used PHP (8.3) which is an absolute joy to work with. The architecture is very scalable, but I've only tested up to a few billion logs. The current version is used in production for a few months now. Hope you enjoy/fork it as you see fit!

hk1337 - 2 days ago

It's a minor thing but I would remove the jQuery dependency. You're not doing much with that plain javascript couldn't do just as well if not better. Plain JS has come a long way since jQuery first came out.

piterrro - a day ago

> there are many log services available and this is my attempt at a better one.

Out of curiosity, can you describe how your service is better than others?

>I hope my application fixes most of these issues

Do you care to elaborate on the "how"?

adriand - 2 days ago

I’m curious about the open source nature of this and how you / people in general manage a project where you are hosting it and need to maintain its security, but are also presumably merging pull requests as people contribute to the project. I would be quite paranoid about this, ie concerned that someone might slip a line of code in with the intent of breaching the service that I would not catch during code review. I know this is true of any open source project but it feels especially fraught when you are also hosting it and letting people sign up and pay for it. I’m wondering if you or others have experience with this and what approaches and practices mitigate this risk.

TripleChecker - a day ago

It looks like that's a PHP codebase. I'm curious why one should use this solution instead of more performant Go/Rust log backends?

Also, one of the login links takes you to a 404 page: https://triplechecker.com/s/jDTmQa/txtlog.net

nesarkvechnep - 2 days ago

Some people praised Go as a better language for the use case than PHP. I’d say Elixir is even better. It can handle massive concurrency easy, can be made distributed easy, has a built-in, in-memory, key-value store (ETS), and is probably the best high-level language for anything that’s facing the network.

mdaniel - 2 days ago

What in the world does this mean? https://txtlog.net/doc#:~:text=use%20your%20local%20time%20w... That's made twice as bad by the "we throw away Z because you were just kidding by including it". That leads me to believe that any RFC 3339 that isn't automatically Z (e.g. 1996-12-19T16:39:57-08:00 <https://datatracker.ietf.org/doc/html/rfc3339#section-5.8>) is ... well, I don't know what it's going to do but it likely won't be good

It also appears that your documentation is currently a very verbose version of an OpenAPI spec, so you may save your readers some trouble by actually publishing one, with the added advantage that they come with a "Try it" button in the OpenAPI renders

That would allow you to save the natural language parts for describing things that are not API-centric (such as the "but WWWWHHHHYYY mysql AND clickhouse" that you alluded to elsewhere but wasn't mentioned at all in /doc nor /selfhost)

dobin - 2 days ago

Pretty unrelated, but i like how it displays large amount of potentially diverse JSON events. Would need some better filtering and sorting, hiding of keys etc. Products which do this well are Elastic and Splunk, but are too heavy for my taste.

thomquaid - 2 days ago

the 'easy to use' / 'view' was very nice. if you could add the actual session logs in it would be amazing.

rednafi - 2 days ago

This is nice.

At work, we use Datadog for logging, and I have previously used CloudWatch, Splunk, and Honeycomb. Among these, only Honeycomb makes implementing canonical log lines [1] easier. I want arbitrarily wide, structured logs [2] without paying exorbitant costs for cardinality.

Our Datadog costs are outrageous, and it seems like no one cares at this point. Pydantic Logfire is also doing some good work in Python-specific environments. I use both Python and Go, but Logfire wasn’t as ergonomic in Go.

[1]: https://stripe.com/blog/canonical-log-lines

[2]: https://www.honeycomb.io/blog/structured-events-basis-observ...

reacharavindh - 2 days ago

My current log solution that is based on Clickhouse I’m tinkering with in free time in Victorialogs. https://docs.victoriametrics.com/victorialogs/

bdcravens - 2 days ago

Very nice. A lot of the complexity you described is why I've settled on using CloudWatch logs for anything I have on AWS. I don't need a fancy UI, just a powerful querying language for investigation and debugging. With that said, it would be nice to see at least some mechanism for building aggregates queries (for example, 4* results in the last 24 hours by user) but if it's ClickHouse underneath, I assume that's easy using standard ClickHouse tools.

majkinetor - 2 days ago

We need glorified (rip)grep instead of ELKS and friends, which have huge learning curve. I welcome this effort.

drchaim - 2 days ago

Don't tell me why, but I've developed an instinct that recognizes solutions that use Clickhouse under the hood :)

juanisimo - a day ago

[flagged]

mooreds - 2 days ago

I've heard good things about Axiom[0], especially for high scale needs.

0: https://axiom.co/

- a day ago
[deleted]
theogravity - a day ago

[flagged]

that_guy_iain - 2 days ago

This looks very interesting!

My suggestion for the self-hosting is to create docker images and use docker-compose. The self-hosting currently is a bit of effort to setup.

I also wonder if PHP is a good language for this. For the UI, yea that's fine and makes sense. But for the log processor that's going to need to handle a high throughput which PHP just isn't good at. For the same resources, you can have Go doing thousands of requests per second vs PHP doing hundreds of requests per second.