diff --git a/obfscp/scp.go b/obfscp/scp.go index ce11e6c..0f5a0c4 100644 --- a/obfscp/scp.go +++ b/obfscp/scp.go @@ -16,8 +16,6 @@ import ( "github.com/bgentry/speakeasy" "github.com/fangdingjun/go-log" - "github.com/fangdingjun/go-log/formatters" - "github.com/fangdingjun/go-log/writers" "github.com/fangdingjun/obfssh" "github.com/kr/fs" "github.com/pkg/sftp" @@ -68,7 +66,7 @@ func main() { os.Exit(1) } if logfile != "" { - log.Default.Out = &writers.FixedSizeFileWriter{ + log.Default.Out = &log.FixedSizeFileWriter{ MaxCount: logFileCount, Name: logfile, MaxSize: logFileSize * 1024 * 1024, @@ -84,8 +82,6 @@ func main() { log.Default.Level = lv } - log.Default.Formatter = &formatters.TextFormatter{TimeFormat: "2006-01-02 15:04:05.000"} - var err error if strings.Contains(args[0], ":") { diff --git a/obfssh/ssh.go b/obfssh/ssh.go index 54237a3..a7173c3 100644 --- a/obfssh/ssh.go +++ b/obfssh/ssh.go @@ -13,8 +13,6 @@ import ( "github.com/bgentry/speakeasy" "github.com/fangdingjun/go-log" - "github.com/fangdingjun/go-log/formatters" - "github.com/fangdingjun/go-log/writers" "github.com/fangdingjun/obfssh" "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/agent" @@ -55,7 +53,7 @@ func main() { flag.Parse() if logfile != "" { - log.Default.Out = &writers.FixedSizeFileWriter{ + log.Default.Out = &log.FixedSizeFileWriter{ MaxCount: logFileCount, Name: logfile, MaxSize: logFileSize * 1024 * 1024, @@ -75,8 +73,6 @@ func main() { log.Default.Level = lv } - log.Default.Formatter = &formatters.TextFormatter{TimeFormat: "2006-01-02 15:04:05.000"} - if configfile != "" { if err := loadConfig(&cfg, configfile); err != nil { log.Fatal(err) diff --git a/obfsshd/server.go b/obfsshd/server.go index 42182d3..b1a3fc8 100644 --- a/obfsshd/server.go +++ b/obfsshd/server.go @@ -11,8 +11,6 @@ import ( "os" "github.com/fangdingjun/go-log" - "github.com/fangdingjun/go-log/formatters" - "github.com/fangdingjun/go-log/writers" "github.com/fangdingjun/obfssh" "golang.org/x/crypto/ssh" ) @@ -34,7 +32,7 @@ func main() { flag.Parse() if logfile != "" { - log.Default.Out = &writers.FixedSizeFileWriter{ + log.Default.Out = &log.FixedSizeFileWriter{ MaxCount: logFileCount, Name: logfile, MaxSize: logFileSize * 1024 * 1024, @@ -50,8 +48,6 @@ func main() { log.Default.Level = lv } - log.Default.Formatter = &formatters.TextFormatter{TimeFormat: "2006-01-02 15:04:05.000"} - conf, err := loadConfig(configfile) if err != nil { log.Fatal(err)