From 3a5b7b1bd674efae8c075355ac453b3f01d9865f Mon Sep 17 00:00:00 2001 From: fangdingjun Date: Tue, 31 Jul 2018 17:27:20 +0800 Subject: [PATCH] change level for log message --- obfsshd/config.go | 7 ++++--- server.go | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/obfsshd/config.go b/obfsshd/config.go index dd64079..5e2a434 100644 --- a/obfsshd/config.go +++ b/obfsshd/config.go @@ -2,10 +2,11 @@ package main import ( "bytes" + "io/ioutil" + + "github.com/fangdingjun/go-log" "github.com/go-yaml/yaml" "golang.org/x/crypto/ssh" - "io/ioutil" - "log" ) type listen struct { @@ -51,7 +52,7 @@ func loadConfig(f string) (*serverConfig, error) { for i := range c.Users { buf1, err := ioutil.ReadFile(c.Users[i].AuthorizedKeyFile) if err != nil { - log.Printf("read publickey for %s failed, ignore", c.Users[i].Username) + log.Warnf("read publickey for %s failed, ignore", c.Users[i].Username) continue } diff --git a/server.go b/server.go index c2b17aa..fd57d46 100644 --- a/server.go +++ b/server.go @@ -298,7 +298,7 @@ func (sc *Server) handleTcpipForward(req *ssh.Request) { for { c, err := l.Accept() if err != nil { - log.Errorf("%s", err.Error()) + log.Debugf("%s", err.Error()) return } log.Debugf("accept connection from %s", c.RemoteAddr())