mirror of
https://github.com/openziti/zrok.git
synced 2025-06-19 17:27:54 +02: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)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
logrus.Infof("here")
|
|
||||||
|
|
||||||
auth := httptransport.APIKeyAuth("X-TOKEN", "header", zrd.Env.Token)
|
auth := httptransport.APIKeyAuth("X-TOKEN", "header", zrd.Env.Token)
|
||||||
req := share.NewShareParams()
|
req := share.NewShareParams()
|
||||||
req.Body = &rest_model_zrok.ShareRequest{
|
req.Body = &rest_model_zrok.ShareRequest{
|
||||||
|
@ -2,14 +2,15 @@ package tcpTunnel
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
"io"
|
||||||
"net"
|
"net"
|
||||||
)
|
)
|
||||||
|
|
||||||
const bufSz = 10240
|
const bufSz = 10240
|
||||||
|
|
||||||
func txer(from, to net.Conn) {
|
func txer(from, to net.Conn) {
|
||||||
logrus.Infof("started '%v' -> '%v'", from.RemoteAddr(), to.RemoteAddr())
|
logrus.Debugf("started '%v' -> '%v'", from.RemoteAddr(), to.RemoteAddr())
|
||||||
defer logrus.Warnf("exited '%v' -> '%v'", from.RemoteAddr(), to.RemoteAddr())
|
defer logrus.Debugf("exited '%v' -> '%v'", from.RemoteAddr(), to.RemoteAddr())
|
||||||
|
|
||||||
buf := make([]byte, bufSz)
|
buf := make([]byte, bufSz)
|
||||||
for {
|
for {
|
||||||
@ -28,7 +29,9 @@ func txer(from, to net.Conn) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} 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()
|
_ = to.Close()
|
||||||
_ = from.Close()
|
_ = from.Close()
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user