add a script to color log
authorLaurent Mazet <laurent.mazet@thalesgroup.com>
Fri, 1 Apr 2016 12:48:03 +0000 (14:48 +0200)
committerLaurent Mazet <laurent.mazet@thalesgroup.com>
Fri, 1 Apr 2016 12:48:03 +0000 (14:48 +0200)
master/root/bin/colorlog [new file with mode: 0755]

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