Crates.io | jlq |
lib.rs | jlq |
version | 0.1.0 |
source | src |
created_at | 2023-01-03 20:12:17.092899 |
updated_at | 2023-01-03 20:12:17.092899 |
description | Query JSON log files quickly and efficiently with the power of SQLite |
homepage | https://github.com/hamin/jlq |
repository | |
max_upload_size | |
id | 750387 |
size | 24,550,315 |
SQLite
fileSQLite
in-memory for faster processingThis tool doesn't have any plans to cover jq
or any other query syntax othen than provided out of the box from SQLite
.
cargo install jlq
It might help to first take a look at the options avaiable via jql -h
jlq 0.1.0
USAGE:
jlq [FLAGS] [OPTIONS] [FILE]...
FLAGS:
-d, --debug Activate debug mode
-h, --help Prints help information
-m, --in-memory-storage Run SQLite in-memory mode
-t, --tail
-V, --version Prints version information
-v, --verbose Verbose mode (-v, -vv, -vvv, etc.)
OPTIONS:
-q, --query <query> SQLite json query e.g. "log_line->>'level_name' = 'DEBUG'"
ARGS:
<FILE>... Files to process
NOTE: When running jlq
with SQLite
on-disk mode (the default), a SQLite
file named jql.db
is created from the directory where the command was run.
jlq -q "log_line->>'status_code' IN (200, 400)" log_a.json log_b.json
jlq -t -q "log_line->>'status_code' IN (200, 400)" log_a.json log_b.json
jlq -t -m -q "log_line->>'status_code' IN (200, 400)" log_a.json log_b.json
PRs are welcome!
This project is licensed under the MIT license
Leave a ⭐ if you like this project
Made with 💖 using SQLite
🛢 and Rust
🦀