Logpeek is a simple logfile regex matcher program

Related tags

Logging logpeek
Overview

logpeek

Logpeek is a simple logfile regex matcher program. It allows matching a file line by line using regular expressions and can be configured using a JSON based configuration file.

Table of content

Installation

This program requires the latest version of Rust. To install minutecat-cli simplt clone the repository and run:

cargo install --path ./cli --locked

Usage

Command line

The following command will scan main.ccp for the word main. Use --help for more information and a list of available options.

logpeek ./main.cpp -r "main" -o "{}" -p

JSON Configuration

The following json can be specified using the -c flag. It is functionally identical to the command line example above

{
  "conditions": [
    {
      "if_match": {
        "kind": {
          "Re": {
            "expr": "main"
          }
        },
        "or": [],
        "and": [],
        "not": false
      },
      "then": {
        "Basic": {
          "message": "{}"
        }
      },
      "output_input": true,
      "else_then": null
    }
  ]
}

License

This program is distributed under the terms of the MIT License.

Contributing

All contributions are welcome. Both pull requests and issue reports are always appreciated. Please make sure that all existing tests pass before submitting a pull request.

TODO

You might also like...
An API for getting questions from http://either.io implemented fully in Rust, using reqwest and some regex magic. Provides asynchronous and blocking clients respectively.

eithers_rust An API for getting questions from http://either.io implemented fully in Rust, using reqwest and some regex magic. Provides asynchronous a

A tui to test regexes on the rust regex crate

regex-tui Structure src/ ├── app.rs - holds the states and renders the widgets ├── event.rs - handles the terminal events (key press, mouse cl

Calcit binding to Rust regex

Rust library for Calcit runtime.

An implementation of request routing via a singular grouped regex (with support for path parameter extraction).

rs-regex-router An implementation of request routing via a singular grouped regex (with support for path parameter extraction). Features Design approa

ripgrep recursively searches directories for a regex pattern while respecting your gitignore
ripgrep recursively searches directories for a regex pattern while respecting your gitignore

ripgrep (rg) ripgrep is a line-oriented search tool that recursively searches the current directory for a regex pattern. By default, ripgrep will resp

A small rust library for creating regex-based lexers

A small rust library for creating regex-based lexers

A visual regex substitution tool
A visual regex substitution tool

A visual regex substitution tool

CLI tool that extracts a regex pattern from a list of urls ( Rust )

rextract CLI tool that extracts a regex pattern from a list of urls. The tool is written in Rust and supports PCRE. Installation Step 1: Visit https:/

`rusty_regex` takes an input string and produces a `regex` string representing what was provided.

rusty_regex This project provides a binary that takes an input string, and preps it for regex usage, effectively replacing known generics and producin

`matchable` provides a convenient enum for checking if a piece of text is matching a string or a regex.

matchable matchable provides a convenient enum for checking if a piece of text is matching a string or a regex. The common usage of this crate is used

Rust regex in ECMAScript regular expression syntax!

ecma_regex The goal of ecma_regex is to provide the same functionality as the regex crate in ECMAScript regular expression syntax. Reliable regex engi

Fast regex in Rust for Apache Arrow, compiled to WASM

Rust regex in wasm I have been looking for a fast regular expression library in Javascript that runs on Apache Arrow for a few years. Arrow uses UTF-8

`grep` but with PEG patterns. Define grammars (e.g. `digit`), functions for matching. No more regex syntax!

PEG peggrep Example file demo_file: THIS LINE IS THE 1ST UPPER CASE LINE IN THIS FILE. this line is the 1st lower case line in this file. This Line Ha

Reef: A zkSNARK system for proving that a committed document matches a regex

Reef This is an implementation of Reef, a system for generating zero-knowledge proofs that a committed document matches or does not match a regular ex

That program use on platform windows. And if you write any text on uncorrect keyboard layout, that program for that.
That program use on platform windows. And if you write any text on uncorrect keyboard layout, that program for that.

📌 This program is designed to translate text into the correct layout when typing is incorrect. 📌 Example ghbdtn - привет Just (by default) pressing

a simple program that you can scrap, is shit and really simple but is cool.

if you want to run it you need to have installed curl by default scrap youtube, but you can change it, also change the number of threads and run: carg

Simple CI program for running fuzzing over TezEdge.

Fuzzing CI This program is designed to run fuzzing on selected branches of a source project, restarting it as a new commit arrives. Building cargo bui

fd is a program to find entries in your filesystem. It is a simple, fast and user-friendly alternative to find
fd is a program to find entries in your filesystem. It is a simple, fast and user-friendly alternative to find

fd is a program to find entries in your filesystem. It is a simple, fast and user-friendly alternative to find. While it does not aim to support all of find's powerful functionality, it provides sensible (opinionated) defaults for a majority of use cases.

A simple program to show a histogram on the terminal.

A simple program to show a histogram on the terminal.

Comments
  • Github actions fails but builds work as expected locally

    Github actions fails but builds work as expected locally

    The build and test github actions fails. The error seems to be related to clap not being found even though it is specified in Cargo.toml Expected: Actions should be successful

    bug 
    opened by unlink2 0
  • Regex conditional matching based on nested json-match input

    Regex conditional matching based on nested json-match input

    The configuration should look something like this

    [ { "if": { regex: ", not: false, or: [next if], and: [nex if], }, "then": <response_type>, "else": None/<response_type>/next matcher object } ]

    the not fields inverts an expression, and and not contain nested conditions.

    opened by unlink2 0
Owner
Lukas
Lover of hacky code
Lukas
A dead simple logger that works globally and across threads.

Woody A logger for Rust that's *actually* easy to use. Features Easy to use: Just import the macros and you're good to go. No need to configure anythi

Travis A. Wagner 11 Apr 13, 2023
This crate converts Rust compatible regex-syntax to Vim's NFA engine compatible regex.

This crate converts Rust compatible regex-syntax to Vim's NFA engine compatible regex.

kaiuri 1 Feb 11, 2022
A native Rust port of Google's robots.txt parser and matcher C++ library.

robotstxt A native Rust port of Google's robots.txt parser and matcher C++ library. Native Rust port, no third-part crate dependency Zero unsafe code

Folyd 72 Dec 11, 2022
Propositional logic evaluator and rule-based pattern matcher

Plogic Propositional logic evaluator and pattern transformer written in Rust. Plogic evaluates logic expressions in a REPL (Read, Execute, Print, Loop

Jan 17 Nov 25, 2022
A parser and matcher for route patterns in Rust 🦀

Route Pattern A parser and matcher for a popular way to create route patterns. Patterns like these that include regular expressions, delimited in this

Dotan J. Nahum 3 Nov 24, 2022
A pure, low-level tensor program representation enabling tensor program optimization via program rewriting

Glenside is a pure, low-level tensor program representation which enables tensor program optimization via program rewriting, using rewriting frameworks such as the egg equality saturation library.

Gus Smith 45 Dec 28, 2022
A simple program for C program IO testing. Written in Rust

A simple program for C program IO testing. Written in Rust, using concurrency to speed up valgrind testing. Make sure to update settings at your first run of the program!

null 1 Feb 22, 2022
A Rust macro for writing regex pattern matching.

regexm A Rust macro for writing regex pattern matching.

Takayuki Maeda 46 Oct 24, 2022
ripgrep recursively searches directories for a regex pattern while respecting your gitignore

ripgrep (rg) ripgrep is a line-oriented search tool that recursively searches the current directory for a regex pattern. By default, ripgrep will resp

Andrew Gallant 35k Jan 2, 2023
git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers.⛰️

git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers. The changelog template can be customized with a configuration file to match the desired format.

Orhun Parmaksız 5k Jan 9, 2023