Skip to content

Colorize ZSH Terminal Logs based on custom regex #11687

Closed Answered by JosueGauthier
JosueGauthier asked this question in Help
Discussion options

You must be logged in to vote

Hello I found the solution to my need.

Here is the solution i used the generic colouriser of garabik : https://github.com/garabik/grc

You need to install it and then create inside .grc a file custom_grc.conf and paste this :

regexp=DBG
colour=green
-
regexp=.*INF.*
colour=blue
-
regexp=.*WRN.*
colour=yellow
-
regexp=.*ERR.*
colour=red

Then you can use the command

mycommand | grcat custom_grc.conf

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JosueGauthier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant