A tool for highlighting words in your terminal
cargo install colorizer
There are built-in profiles, currently only one (nginx) :)
// via pipe
cat access.log | colorizer -p nginx
There are built-in regular expressions, you can start using them without config ``` // via pipe cat server.log | colorizer --email YELLOW --ipv4 RED --isotime CYAN
// or file as arg colorizer server.log --email YELLOW --ipv4 RED --isotime CYAN ```
Create or Download settings.json and create one or more profiles, the profile with the name "default" is used if you do not pass the names of the profiles as arguments
You can use multiple profiles
cat server.log | colorizer --config settings.json -p prof1 prof2 prof3
tail also work
tail -f access.log | colorizer -p nginx
cargo install colorizer
git clone https://github.com/kulinsky/colorizer
cd colorizer
cargo build --release
{
"default": {},
"profile1": {}
}
{
"default": {
"substrings": {
"info": "GREEN",
"debug": "BLUE",
"error": "RED"
},
"regex": {
"(\\d{4})-(\\d{2})-(\\d{2})": "PURPLE"
}
},
"profile1": {
"substrings": {
"null": "CYAN",
"time": "YELLOW",
"message": "PURPLE"
}
}
}
example is in the repositorynow run the application
cat server.log | colorizer --config settings.json --profile profile1