practicalli / clojure-web-services

Develop production grade server-side web services and APIs using Clojure and REPL driven development
https://practical.li/clojure-web-services
Creative Commons Attribution Share Alike 4.0 International
11 stars 14 forks source link

Log line parsers #52

Open practicalli-johnny opened 3 years ago

practicalli-johnny commented 3 years ago

Libraries or tools that support log-line parsers for logs across the variety of languages/platforms?

Notes from the community

clj-antlr might be the most robust as you might find compatible grammar definitions around the internet (that's how we kick started our Lucene-like query interface in our product)

Started with regex, too limiting, have moved on to instaparse. Thought about clj-antlr, but didn't have a lot of hope for finding open-sourced grammars. I guess I should actually look...

If care about speed ANTLR is much faster than instaparse

Definitely. Instaparse is nice for REPL-driven development, but once I get the grammars nailed down I'll probably move to ANTLR.

i noticed that https://github.com/antlr/grammars-v4 had a variety of grammars -- is it possible one of them might already be close to what you might need?

turning out to be pretty easy to define log parsers in instaparse.