add a script to color log
authorLaurent Mazet <laurent.mazet@thalesgroup.com>
Mon, 23 May 2016 14:50:36 +0000 (16:50 +0200)
committerLaurent Mazet <laurent.mazet@thalesgroup.com>
Mon, 23 May 2016 14:50:36 +0000 (16:50 +0200)
master/root/bin/colorlog [new file with mode: 0644]

diff --git a/master/root/bin/colorlog b/master/root/bin/colorlog
new file mode 100644 (file)
index 0000000..7e0ae00
--- /dev/null
@@ -0,0 +1,7 @@
+#!/usr/bin/awk -f
+/TRACE/ {$0="\033[1;34m" $0 "\033[0;0m"} # blue
+/DEBUG/ {$0="\033[1;32m" $0 "\033[0;0m"} # green
+/INFO/ {}
+/WARN/ {$0="\033[1;33m" $0 "\033[0;0m"} # yellow
+/ERROR/ {$0="\033[1;31m" $0 "\033[0;0m"} # red
+{print}