This folder contains the documentation on how to interact with Logria programmatically as well as how to leverage its feature-set as a user.
- Parsers
- Details on how to configure parsers for log parsing
- Sessions
- Details on how to configure sessions when launching the app
- Input Handler
- Details on how input handler classes open subprocesses
- Commands
- Details on commands available in the app
cargo install logria
is the best way to install the app for normal use.
clone
the repositorycd
to the repositorycargo test
to make sure everything workscargo run --release
to compile
By default, Logria will create a /Logria/
directory to store parsers, sessions, and an input history tape in. The location is platform dependent.
Platform | Value | Example |
---|---|---|
Linux | $XDG_DATA_HOME or $HOME/.config |
~/.config/Logria |
macOS | $HOME/Library/Application Support |
~/Library/Application Support/Logria |
Windows | {FOLDERID_RoamingAppData} |
%homedrive%%homepath%\AppData\Roaming\Logria |
If you want to specify a different path, either set LOGRIA_ROOT
to replace the /Logria/
directory or set LOGRIA_USER_HOME
to move the directory away from the default $HOME
. Setting both means the app looks in $LOGRIA_USER_HOME/$LOGRIA_ROOT
.
Environment Variable | Value | Result |
---|---|---|
LOGRIA_ROOT |
.conf/.logria |
~/.conf/.logria/ |
LOGRIA_USER_HOME |
/usr/local/ |
/usr/local/Logria |
both of the above | /usr/local/.conf/.logria/ |
To see available commands, invoke Logria with -h
:
chris@home ~ % logria -h
A powerful CLI tool that puts log analytics at your fingertips.
USAGE:
logria [FLAGS] [OPTIONS]
Usage: logria [OPTIONS]
Options:
-t, --no-history-tape Disable command history disk cache
-m, --mindless Disable variable polling rate based on incoming message rate
-d, --docs Prints documentation
-p, --paths Prints current configuration paths
-e, --exec <stream> Command to listen to, ex: logria -e "tail -f log.txt"
-h, --help Print help information
-V, --version Print version information
Start Logria by invoking it as a command line application:
chris@home ~ % logria
This will launch the app and show us the splash screen:
Enter a new command to open and save a new stream,
or enter a number to choose a saved session from the list.
Enter `:r #` to remove session #.
Enter `:q` to quit.
0: File - readme
1: File - Sample Access Log
2: Cmd - Generate Test Logs
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
Entering 2
will load and open handles to the commands in Cmd - Generate Test Logs
:
2020-02-23 16:56:10,786 - __main__.<module> - MainProcess - INFO - I am the first log in the list
2020-02-23 16:56:10,997 - __main__.<module> - MainProcess - INFO - I am a first log! 21
2020-02-23 16:56:10,997 - __main__.<module> - MainProcess - INFO - I am a second log! 71
2020-02-23 16:56:11,100 - __main__.<module> - MainProcess - INFO - I am a first log! 43
2020-02-23 16:56:11,100 - __main__.<module> - MainProcess - INFO - I am a second log! 87
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
Typing /
and entering 100
will filter our stream down to only lines that match that pattern:
2020-02-23 16:56:11,100 - __main__.<module> - MainProcess - INFO - I am a first log! 43
2020-02-23 16:56:11,100 - __main__.<module> - MainProcess - INFO - I am a second log! 87
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│Regex with pattern /100/ │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
Pressing esc
will reset the filter:
2020-02-23 16:56:10,786 - __main__.<module> - MainProcess - INFO - I am the first log in the list
2020-02-23 16:56:10,997 - __main__.<module> - MainProcess - INFO - I am a first log! 21
2020-02-23 16:56:10,997 - __main__.<module> - MainProcess - INFO - I am a second log! 71
2020-02-23 16:56:11,100 - __main__.<module> - MainProcess - INFO - I am a first log! 43
2020-02-23 16:56:11,100 - __main__.<module> - MainProcess - INFO - I am a second log! 87
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
Typing :
and entering :q
will exit the app.
- No pull request shall be behind develop
- First come, first served
- If anything breaks, the pull request will be queued again when the issue is resolved
- Pull request comments will be resolved by the person who created them
- When using
tmux
or other emulators that change the$TERM
environment variable, you must set the default terminal to something that supports color. Intmux
, this is as simple as addingset -g default-terminal "screen-256color"
to.tmux.conf
. - The package version in
Cargo.toml
is0.0.0
. This is because during release that value gets replaced with the current release tag name.