Skip to content

Commit

Permalink
Improve logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollo3zehn committed Nov 2, 2022
1 parent 5a3202c commit be11861
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Nexus.Sources.Remote/Remote.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,12 @@ public async Task SetContextAsync(
if (apiVersion < 1 || apiVersion > Remote.API_LEVEL)
throw new Exception($"The API level '{apiVersion}' is not supported.");

logger.LogTrace("Set context to remote client");

await _rpcServer
.SetContextAsync(context, timeoutTokenSource.Token);

logger.LogDebug("Done preparing remote client");
}

public async Task<CatalogRegistration[]> GetCatalogRegistrationsAsync(
Expand Down
4 changes: 4 additions & 0 deletions src/Nexus.Sources.Remote/RemoteCommunicator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ public async Task<IJsonRpcServer> ConnectAsync(CancellationToken cancellationTok
cancellationToken.Register(() => _tcpListener.Stop());

// start process
_logger.LogDebug("Start process.");

var psi = new ProcessStartInfo(_command)
{
Arguments = _arguments,
Expand Down Expand Up @@ -105,6 +107,8 @@ public async Task<IJsonRpcServer> ConnectAsync(CancellationToken cancellationTok
_process.BeginErrorReadLine();

// wait for clients to connect
_logger.LogDebug("Wait for clients to connect.");

var filters = new string[] { "comm", "data" };

Stream? commStream = default;
Expand Down

0 comments on commit be11861

Please sign in to comment.