From 923a02f99ba268f79b82fdd7bc109e47c91e42d1 Mon Sep 17 00:00:00 2001 From: ZhengYang Date: Thu, 14 Aug 2014 12:20:49 +0800 Subject: [PATCH] colorlog for [INFO] --- util.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util.go b/util.go index 183f058..0e24d08 100644 --- a/util.go +++ b/util.go @@ -58,6 +58,7 @@ const ( //NRed = uint8(31) // Normal EndColor = "\033[0m" + INFO = "INFO" TRAC = "TRAC" ERRO = "ERRO" WARN = "WARN" @@ -139,6 +140,8 @@ func ColorLogS(format string, a ...interface{}) string { func getColorLevel(level string) string { level = strings.ToUpper(level) switch level { + case INFO: + return fmt.Sprintf("\033[%dm%s\033[0m", Blue, level) case TRAC: return fmt.Sprintf("\033[%dm%s\033[0m", Blue, level) case ERRO: