@@ -82,7 +82,7 @@ func runAction(cmd *cobra.Command, args []string) error {
82
82
case SIGUSR1 :
83
83
mem := runtime.MemStats {}
84
84
runtime .ReadMemStats (& mem )
85
- logrus .Info ("stats:\n " +
85
+ logrus .Infof ("stats:\n " +
86
86
" %s, uptime: %s\n " +
87
87
" goroutines: %d, mem-alloc: %d\n " +
88
88
" connections open: %d total: %d" ,
@@ -97,11 +97,11 @@ func runAction(cmd *cobra.Command, args []string) error {
97
97
}
98
98
}()
99
99
//accept connections
100
- logrus .Info ("listening on " + source + " and forwarding to " + destination )
100
+ logrus .Infof ("listening on %s and forwarding to %s" , source , destination )
101
101
for {
102
102
uconn , err := l .Accept ()
103
103
if err != nil {
104
- logrus .Info ("accept failed: %s" , err )
104
+ logrus .Infof ("accept failed: %s" , err )
105
105
continue
106
106
}
107
107
go fwd (uconn , destination , quiet )
@@ -141,7 +141,7 @@ func fwd(uconn net.Conn, destination string, quiet bool) {
141
141
atomic .AddInt64 (& current , 1 )
142
142
//optional log
143
143
if ! quiet {
144
- logrus .Info ("connection #%d (%d open)" , atomic .LoadUint64 (& total ), atomic .LoadInt64 (& current ))
144
+ logrus .Infof ("connection #%d (%d open)" , atomic .LoadUint64 (& total ), atomic .LoadInt64 (& current ))
145
145
}
146
146
//pipe!
147
147
go func () {
0 commit comments