|
@@ -25,9 +25,17 @@ type Logger struct {
|
|
func (this *Logger) console(msg logMsg) {
|
|
func (this *Logger) console(msg logMsg) {
|
|
if consts.ParamDebug {
|
|
if consts.ParamDebug {
|
|
if !msg.isError {
|
|
if !msg.isError {
|
|
- fmt.Fprintln(os.Stdout, "\033[0;32m[ACCESS] "+msg.message+"\033[0m")
|
|
|
|
|
|
+ if consts.IS_WIN {
|
|
|
|
+ fmt.Fprintln(os.Stdout, "[ACCESS] "+msg.message)
|
|
|
|
+ } else {
|
|
|
|
+ fmt.Fprintln(os.Stdout, "\033[0;32m[ACCESS] "+msg.message+"\033[0m")
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- fmt.Fprintln(os.Stdout, "\033[0;31m[ERROR] "+msg.message+"\033[0m")
|
|
|
|
|
|
+ if consts.IS_WIN {
|
|
|
|
+ fmt.Fprintln(os.Stdout, "[ERROR] "+msg.message)
|
|
|
|
+ } else {
|
|
|
|
+ fmt.Fprintln(os.Stdout, "\033[0;31m[ERROR] "+msg.message+"\033[0m")
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return
|
|
return
|
|
}
|
|
}
|