config

Personal configuration.
git clone git://code.dwrz.net/config
Log | Files | Refs

colorize-logs (314B)


      1 #!/bin/sh
      2 
      3 awk '
      4 {
      5 	switch($0)
      6 	{
      7 		case /DEBUG/:
      8  		print "\033[35m" $0 "\033[39m"
      9  		break
     10 
     11  		case /ERROR/:
     12  		print "\033[31m" $0 "\033[39m"
     13  		break
     14 
     15  		case /INFO/:
     16  		print "\033[32m" $0 "\033[39m"
     17  		break
     18 
     19  		case /WARN/:
     20  		print "\033[33m" $0 "\033[39m"
     21  		break
     22 
     23  		default:
     24  		print $0
     25 		break
     26 	}
     27 }
     28 '