diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-06-24 08:41:12 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-06-24 08:41:12 -0500 |
| commit | 7383d448e7481ca5dc046b8118e5709ab571b69f (patch) | |
| tree | be15aee66b361efe6e6d2c97db59236be4c0202f /src | |
| parent | 5cccb58849a2cb36cf41c26602df36a425e7c544 (diff) | |
| download | slskd-7383d448e7481ca5dc046b8118e5709ab571b69f.tar.gz | |
log connection events
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Application/Service.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/slskd/Application/Service.cs b/src/slskd/Application/Service.cs index 43688a0e..60fae0cc 100644 --- a/src/slskd/Application/Service.cs +++ b/src/slskd/Application/Service.cs @@ -121,6 +121,7 @@ namespace slskd Client.RoomLeft += Client_RoomLeft; Client.Disconnected += Client_Disconnected; Client.Connected += Client_Connected; + Client.LoggedIn += Client_LoggedIn; SoulseekClient = Client; @@ -207,18 +208,23 @@ namespace slskd private void Client_Connected(object sender, EventArgs e) { - Logger.Information("Connected and logged in as {Username}", Options.Soulseek.Username); + Logger.Information("Connected to the Soulseek server"); + } + + private void Client_LoggedIn(object sender, EventArgs e) + { + Logger.Information("Logged in to the Soulseek server as {Username}", Options.Soulseek.Username); } private async void Client_Disconnected(object sender, SoulseekClientDisconnectedEventArgs args) { if (args.Exception is ObjectDisposedException || args.Exception is ApplicationShutdownException) { - Logger.Debug("Disconnected from the Soulseek server: the client is shutting down"); + Logger.Information("Disconnected from the Soulseek server: the client is shutting down"); } else if (args.Exception is IntentionalDisconnectException) { - Logger.Debug("Disconnected from the Soulseek server: disconnected by the user"); + Logger.Information("Disconnected from the Soulseek server: disconnected by the user"); } else if (args.Exception is LoginRejectedException) { |
