mirror of
https://github.com/openziti/zrok.git
synced 2024-11-07 16:54:23 +01:00
logging lint (#170)
This commit is contained in:
parent
1177b0ec0a
commit
e2193e3ac4
@ -102,8 +102,6 @@ func (cmd *sharePrivateCommand) run(_ *cobra.Command, args []string) {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
logrus.Infof("here")
|
||||
|
||||
auth := httptransport.APIKeyAuth("X-TOKEN", "header", zrd.Env.Token)
|
||||
req := share.NewShareParams()
|
||||
req.Body = &rest_model_zrok.ShareRequest{
|
||||
|
@ -2,14 +2,15 @@ package tcpTunnel
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"io"
|
||||
"net"
|
||||
)
|
||||
|
||||
const bufSz = 10240
|
||||
|
||||
func txer(from, to net.Conn) {
|
||||
logrus.Infof("started '%v' -> '%v'", from.RemoteAddr(), to.RemoteAddr())
|
||||
defer logrus.Warnf("exited '%v' -> '%v'", from.RemoteAddr(), to.RemoteAddr())
|
||||
logrus.Debugf("started '%v' -> '%v'", from.RemoteAddr(), to.RemoteAddr())
|
||||
defer logrus.Debugf("exited '%v' -> '%v'", from.RemoteAddr(), to.RemoteAddr())
|
||||
|
||||
buf := make([]byte, bufSz)
|
||||
for {
|
||||
@ -28,7 +29,9 @@ func txer(from, to net.Conn) {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
logrus.Errorf("read error '%v' -> '%v': %v", from.RemoteAddr(), to.RemoteAddr(), err)
|
||||
if err != io.EOF {
|
||||
logrus.Errorf("read error '%v' -> '%v': %v", from.RemoteAddr(), to.RemoteAddr(), err)
|
||||
}
|
||||
_ = to.Close()
|
||||
_ = from.Close()
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user