Skip to content

Commit

Permalink
change Client ssh info logs to verbose. (#268)
Browse files Browse the repository at this point in the history
* make some client ssh info verbose.

* fix string
  • Loading branch information
setaskin authored Jul 7, 2023
1 parent 8102e8d commit aa429f4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cs/src/Connections/TunnelRelayTunnelHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ protected virtual async Task<Stream> CreateSessionStreamAsync(CancellationToken
};

ValidateAccessToken();
Trace.TraceInformation("Connecting to host tunnel relay {0}", this.relayUri!.AbsoluteUri);
Trace.Verbose("Connecting to host tunnel relay {0}", this.relayUri!.AbsoluteUri);
var (stream, subprotocol) = await this.StreamFactory.CreateRelayStreamAsync(
this.relayUri!,
this.accessToken,
Expand Down Expand Up @@ -495,11 +495,12 @@ void Session_Closed(object? sender, SshSessionClosedEventArgs e)
// Reconnecting client session may cause the new session close with 'None' reason and null exception.
if (cancellation.IsCancellationRequested)
{
Trace.TraceInformation("Client ssh session cancelled.");
Trace.WithName("ClientSSH").Verbose("Session cancelled.");
}
else if (e.Reason == SshDisconnectReason.ByApplication)
{
Trace.TraceInformation("Client ssh session closed.");
Trace.WithName("ClientSSH").Verbose("Session closed.");

}
else if (e.Reason != SshDisconnectReason.None || e.Exception != null)
{
Expand Down

0 comments on commit aa429f4

Please sign in to comment.