fix(be):使用next-terminal 自定义的日志
This commit is contained in:
@ -6,7 +6,8 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"next-terminal/pkg/log"
|
||||
|
||||
"golang.org/x/crypto/ssh"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
)
|
||||
@ -30,7 +31,7 @@ func main() {
|
||||
|
||||
client, err := ssh.Dial("tcp", "172.16.101.32:22", sshConfig)
|
||||
if err != nil {
|
||||
logrus.Error(err)
|
||||
log.Error(err)
|
||||
}
|
||||
defer client.Close()
|
||||
|
||||
@ -87,9 +88,9 @@ func (t *SSHTerminal) interactiveSession() error {
|
||||
|
||||
defer func() {
|
||||
if t.exitMsg == "" {
|
||||
logrus.Info(os.Stdout, "the connection was closed on the remote side on ", time.Now().Format(time.RFC822))
|
||||
log.Info(os.Stdout, "the connection was closed on the remote side on ", time.Now().Format(time.RFC822))
|
||||
} else {
|
||||
logrus.Info(os.Stdout, t.exitMsg)
|
||||
log.Info(os.Stdout, t.exitMsg)
|
||||
}
|
||||
}()
|
||||
|
||||
|
Reference in New Issue
Block a user