Skip to content

imadenugraha/Log-Raider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Log Raider

A simple and fast CLI tool to search for keywords in log files, written in Rust.


📝 Description

Log Raider is a basic but efficient log reader built with Rust. It uses:

  • BufReader for memory-efficient file reading
  • clap for command-line argument parsing
  • anyhow for robust error handling
  • assert_cmd for integration testing

Perfect for DevOps and SREs who need lightweight tools for log inspection or as a starting point for building more advanced log parsers.


🧪 Features

  • 🔍 Search for any keyword in a log file
  • 🆚 Optional case-insensitive search (--ignore-case)
  • 📋 Line number output
  • 🧪 Integration test support via assert_cmd

⚙️ How to Use

1. Clone the project

git clone https://github.com/imadenugraha/Log-Raider.git
cd Log-Raider

2. Build the project

cargo build --release

3. Run the app

./target/release/log_raider --file-path "text.log" --keyword "GET"

Optional Flag

--ignore-case

4. Run tests

cargo test

📄 Example Output

Line 1: 10.1.1.1 - [2025-05-18] GET /me? - 200 - 124
Found 1 matches for keyword: GET
Execution time: 0ms

📜 License

This project is licensed under the MIT License.

About

Rust Implementation for reading file and search based on keywords

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages