// Format returns a formatted message in the given color with endline. // func Format(col, sender, msg string, more ...interface{}) string { return fmt.Sprintln(append([]interface{}{ time.Now().Format("15:04:05"), color.Yellow(sender), strhelp.Bracket(color.Colored(msg, col))}, more...)...) }
// Render displays the msg argument in the given color. The colored message is // passed with others to classic println. // func Render(col, msg string, more ...interface{}) { // println(, list...) list := append([]interface{}{time.Now().Format("15:04:05"), color.Yellow(caller()), strhelp.Bracket(color.Colored(msg, col))}, more...) fmt.Println(list...) // log.Println(list...) }
// Warn test and log the error as Warning type. Return true if an error was found. // func Warn(e error, msg string) (fail bool) { return l(e, color.Yellow("Warning"), msg) }
// SetPrefix set the prefix of the logger display. // func SetPrefix(pre string) { std.SetPrefix(color.Yellow("[" + pre + "] ")) log.SetPrefix(color.Yellow("[" + pre + "] ")) log.SetFlags(log.Ltime) }