|
|
@ -5,12 +5,12 @@ import (
|
|
|
|
"fmt"
|
|
|
|
"fmt"
|
|
|
|
"io"
|
|
|
|
"io"
|
|
|
|
"log"
|
|
|
|
"log"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"path"
|
|
|
|
"path"
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
"sync"
|
|
|
|
"sync"
|
|
|
|
"sync/atomic"
|
|
|
|
"sync/atomic"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fatihcolor "github.com/fatih/color"
|
|
|
|
"github.com/zeromicro/go-zero/core/color"
|
|
|
|
"github.com/zeromicro/go-zero/core/color"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
@ -76,8 +76,8 @@ func (w *atomicWriter) Swap(v Writer) Writer {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func newConsoleWriter() Writer {
|
|
|
|
func newConsoleWriter() Writer {
|
|
|
|
outLog := newLogWriter(log.New(os.Stdout, "", flags))
|
|
|
|
outLog := newLogWriter(log.New(fatihcolor.Output, "", flags))
|
|
|
|
errLog := newLogWriter(log.New(os.Stderr, "", flags))
|
|
|
|
errLog := newLogWriter(log.New(fatihcolor.Error, "", flags))
|
|
|
|
return &concreteWriter{
|
|
|
|
return &concreteWriter{
|
|
|
|
infoLog: outLog,
|
|
|
|
infoLog: outLog,
|
|
|
|
errorLog: errLog,
|
|
|
|
errorLog: errLog,
|
|
|
|