#log #log-parser #debugging #inspection #local #query #logql

app loggi

log inspection tool that allows running logql queries (partialy) on local files

2 releases

0.1.1 Jun 18, 2024
0.1.0 Jun 18, 2024

#2 in #inspection

GPL-3.0 license

44KB
569 lines


Loggi



Explore the docs »

Report Bug . Request Feature

Table Of Contents

About The Project

Loggi is a CLI tool for parsing log files using logql (partial syntax).

Today when using project logging on local projects (without grafana integration) I found it hard to debug with grep only, wanting something that will allow me to use number filter queries from loki (x > 2, ...) also the tool allows to use this while tracing a stream which is a great option for runtime usage.

Usage

Installation

Install the tool using cargo cargo install loggi

Running loggi

We will run loggi on a web server log to filter baseUrl for example:

loggi <PATH_TO_WEB_LOG> "logfmt | baseUrl == \"/test/\""

Loggi parameters and syntax

The long way

Parse logs and allow querying them based on Logql syntax

Usage: loggi <PATH> <QUERY>

Arguments:
  <PATH>   Log file or directory path to query from
  <QUERY>  Logql query to run on each log line

Loggi can iterate through directory or one file only, it's you choice

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  • If you have suggestions for adding or removing projects, feel free to open an issue to discuss it, or directly create a pull request after you edit the README.md file with necessary changes.
  • Please make sure you check your spelling and grammar.
  • Create individual PR for each suggestion.

Creating A Pull Request

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GPLv3 License. See LICENSE for more information.

Dependencies

~8–15MB
~198K SLoC