Skip to content

Commit

Permalink
规范化编码
Browse files Browse the repository at this point in the history
  • Loading branch information
karldoenitz committed Nov 28, 2024
1 parent 4a7a8a5 commit b88242e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions logger/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"gopkg.in/yaml.v2"
"io"
"io/ioutil"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -244,7 +243,7 @@ func InitError(level string) {
Error.Level = ErrorLevel
switch {
case level == "" || level == "discard":
Error.Logger = log.New(ioutil.Discard, "\x1b[41m ERROR \x1b[0m ", log.Ldate|log.Ltime)
Error.Logger = log.New(io.Discard, "\x1b[41m ERROR \x1b[0m ", log.Ldate|log.Ltime)
break
case level == "stdout":
Error.Logger = log.New(os.Stdout, "\x1b[41m ERROR \x1b[0m ", log.Ldate|log.Ltime)
Expand Down

0 comments on commit b88242e

Please sign in to comment.