Explorar o código

Change log level of port forward reject messages

Rod Hynes %!s(int64=9) %!d(string=hai) anos
pai
achega
8a52b8afff
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      psiphon/server/tunnelServer.go

+ 4 - 1
psiphon/server/tunnelServer.go

@@ -847,12 +847,15 @@ func (sshClient *sshClient) runClient(
 }
 }
 
 
 func (sshClient *sshClient) rejectNewChannel(newChannel ssh.NewChannel, reason ssh.RejectionReason, logMessage string) {
 func (sshClient *sshClient) rejectNewChannel(newChannel ssh.NewChannel, reason ssh.RejectionReason, logMessage string) {
+
+	// Note: Debug level, as logMessage may contain user traffic destination address information
 	log.WithContextFields(
 	log.WithContextFields(
 		LogFields{
 		LogFields{
 			"channelType":  newChannel.ChannelType(),
 			"channelType":  newChannel.ChannelType(),
 			"logMessage":   logMessage,
 			"logMessage":   logMessage,
 			"rejectReason": reason.String(),
 			"rejectReason": reason.String(),
-		}).Warning("reject new channel")
+		}).Debug("reject new channel")
+
 	// Note: logMessage is internal, for logging only; just the RejectionReason is sent to the client
 	// Note: logMessage is internal, for logging only; just the RejectionReason is sent to the client
 	newChannel.Reject(reason, reason.String())
 	newChannel.Reject(reason, reason.String())
 }
 }