Skip to content

bluejekyll/color-regex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

color-regex

Colorize the output of a log. Quick and dirty tool for adding some color to logs

Install

Download and install Rust: https://rustup.rs/

$ cargo install

Usage

Takes it's stdin and matches on specified strings to then colorize the output.

Get help with:

$ crx --help
color-regex 0.1.0
Benjamin Fry <benjamin.fry@salesforce.com>


USAGE:
    crx [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -g, --green <green>      String to match for green [default: INFO]
    -r, --red <red>          String to match for red [default: ERROR]
    -y, --yellow <yellow>    String to match for yellow [default: WARN]

Right now this only supports matching a single string. It's a very dumb contains match on the input string that it colorizes.

Example

$ cat sayonaradb.log | crx -r ERROR -y WARNING -g LOG
... lots of pretty colored logs...

About

Match std input and colorize the output

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages