diff --git a/log.go b/log.go index 47ea0a9..3e99c98 100644 --- a/log.go +++ b/log.go @@ -96,16 +96,19 @@ func NewLogFormater() *LogFormater { func (l *logger) SetTmpl(tmpl *LogFormater) error { funcMap := template.FuncMap{ - "Time": func() string { return time.Now().Format("2006/01/02 15:04:05") }, - "red": func() string { return "\033[91m" }, - "redl": func() string { return "\033[31m" }, - "green": func() string { return "\033[92m" }, - "yellow": func() string { return "\033[93m" }, - "blue": func() string { return "\033[94m" }, - "magenta": func() string { return "\033[95m" }, - "cyan": func() string { return "\033[96m" }, - "white": func() string { return "\033[97m" }, - "reset": func() string { return "\033[0m" }, + "Time": func() string { return time.Now().Format("2006/01/02 15:04:05") }, + // "red": func() string { return "\033[91m" }, + // "redl": func() string { return "\033[31m" }, + // "green": func() string { return "\033[92m" }, + // "yellow": func() string { return "\033[93m" }, + // "blue": func() string { return "\033[94m" }, + // "magenta": func() string { return "\033[95m" }, + // "cyan": func() string { return "\033[96m" }, + // "white": func() string { return "\033[97m" }, + // "reset": func() string { return "\033[0m" }, + } + if l.color { + } err_tmpl, err := template.New("err_tmpl").Funcs(funcMap).Parse(tmpl.ErrTmplStr) if err != nil {