mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-07 16:06:15 +00:00
Logging
This commit is contained in:
parent
94b8184f7b
commit
cb9a766c3b
@ -242,11 +242,13 @@ namespace CryptoExchange.Net.Sockets
|
||||
/// <inheritdoc />
|
||||
public virtual async Task ProcessAsync()
|
||||
{
|
||||
log.Write(LogLevel.Trace, $"Socket {Id} ProcessAsync started");
|
||||
var sendTask = SendLoopAsync();
|
||||
var receiveTask = ReceiveLoopAsync();
|
||||
var timeoutTask = Timeout != default ? CheckTimeoutAsync() : Task.CompletedTask;
|
||||
log.Write(LogLevel.Debug, $"Socket {Id} processing started");
|
||||
log.Write(LogLevel.Trace, $"Socket {Id} processing startup completed");
|
||||
await Task.WhenAll(sendTask, receiveTask, timeoutTask).ConfigureAwait(false);
|
||||
log.Write(LogLevel.Trace, $"Socket {Id} ProcessAsync finished");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
@ -254,12 +254,12 @@ namespace CryptoExchange.Net.Sockets
|
||||
|
||||
private void StartProcessingTask()
|
||||
{
|
||||
log.Write(LogLevel.Trace, $"Starting {SocketId} processing task");
|
||||
log.Write(LogLevel.Trace, $"Starting {SocketId} process/reconnect task");
|
||||
_socketProcessReconnectTask = Task.Run(async () =>
|
||||
{
|
||||
await _socket.ProcessAsync().ConfigureAwait(false);
|
||||
await ReconnectAsync().ConfigureAwait(false);
|
||||
log.Write(LogLevel.Trace, $"Processing {SocketId} task finished");
|
||||
log.Write(LogLevel.Trace, $"Process/reconnect {SocketId} task finished");
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user