|
|
|
@ -80,12 +80,23 @@ func (logger *starlog) build(thread string, isStd bool, isShow bool, handler fun
|
|
|
|
|
}
|
|
|
|
|
if isShow {
|
|
|
|
|
if !logger.showColor {
|
|
|
|
|
fmt.Print(logStr)
|
|
|
|
|
if level >= logger.errOutputLevel {
|
|
|
|
|
fmt.Fprint(os.Stderr, logStr)
|
|
|
|
|
} else {
|
|
|
|
|
fmt.Print(logStr)
|
|
|
|
|
}
|
|
|
|
|
} else if !logger.onlyColorLevel {
|
|
|
|
|
//logcolor := NewColor(logger.colorList[level]...)
|
|
|
|
|
logger.colorMe[level].Fprint(stdScreen, logStr)
|
|
|
|
|
if level < logger.errOutputLevel {
|
|
|
|
|
logger.colorMe[level].Fprint(stdScreen, logStr)
|
|
|
|
|
} else {
|
|
|
|
|
logger.colorMe[level].Fprint(errScreen, logStr)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
fmt.Fprint(stdScreen, logStr)
|
|
|
|
|
if level < logger.errOutputLevel {
|
|
|
|
|
fmt.Fprint(stdScreen, logStr)
|
|
|
|
|
} else {
|
|
|
|
|
fmt.Fprint(errScreen, logStr)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if handler != nil {
|
|
|
|
|