Skip to content

Commit

Permalink
fix broken logging statements (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianburckhardt authored Apr 18, 2022
1 parent 6babc01 commit 11566d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ void Terminate()

try
{
this.logger?.LogDebug("Part{partition:D2} Started PartitionCancellation");
this.logger?.LogDebug("Part{partition:D2} Started PartitionCancellation", this.partitionId);
this.cts.Cancel();
this.logger?.LogDebug("Part{partition:D2} Completed PartitionCancellation");
this.logger?.LogDebug("Part{partition:D2} Completed PartitionCancellation", this.partitionId);
}
catch (AggregateException aggregate)
{
Expand All @@ -131,7 +131,7 @@ void Shutdown()
{
try
{
this.logger?.LogDebug("Part{partition:D2} Started PartitionShutdown");
this.logger?.LogDebug("Part{partition:D2} Started PartitionShutdown", this.partitionId);

if (this.OnShutdown != null)
{
Expand All @@ -140,7 +140,7 @@ void Shutdown()

this.cts.Dispose();

this.logger?.LogDebug("Part{partition:D2} Completed PartitionShutdown");
this.logger?.LogDebug("Part{partition:D2} Completed PartitionShutdown", this.partitionId);
}
catch (AggregateException aggregate)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ async Task SendBatch(int lastPosition)
}
catch (Exception e)
{
this.traceHelper.LogWarning(e, "EventHubsSender {eventHubName}/{eventHubPartitionId} failed to send", this.eventHubName, this.eventHubPartition, this.sender.EventHubClient.EventHubName, this.sender.PartitionId);
this.traceHelper.LogWarning(e, "EventHubsSender {eventHubName}/{eventHubPartitionId} failed to send", this.eventHubName, this.eventHubPartition);
senderException = e;
}
finally
Expand Down Expand Up @@ -189,9 +189,9 @@ async Task SendBatch(int lastPosition)
}

if (requeued > 0 || dropped > 0)
this.traceHelper.LogWarning("EventHubsSender {eventHubName}/{eventHubPartitionId} has confirmed {confirmed}, requeued {requeued}, dropped {dropped} outbound events", this.eventHubName, this.eventHubPartition, confirmed, requeued, dropped, this.sender.EventHubClient.EventHubName, this.sender.PartitionId);
this.traceHelper.LogWarning("EventHubsSender {eventHubName}/{eventHubPartitionId} has confirmed {confirmed}, requeued {requeued}, dropped {dropped} outbound events", this.eventHubName, this.eventHubPartition, confirmed, requeued, dropped);
else
this.traceHelper.LogDebug("EventHubsSender {eventHubName}/{eventHubPartitionId} has confirmed {confirmed}, requeued {requeued}, dropped {dropped} outbound events", this.eventHubName, this.eventHubPartition, confirmed, requeued, dropped, this.sender.EventHubClient.EventHubName, this.sender.PartitionId);
this.traceHelper.LogDebug("EventHubsSender {eventHubName}/{eventHubPartitionId} has confirmed {confirmed}, requeued {requeued}, dropped {dropped} outbound events", this.eventHubName, this.eventHubPartition, confirmed, requeued, dropped);
}
catch (Exception exception) when (!Utils.IsFatal(exception))
{
Expand Down

0 comments on commit 11566d3

Please sign in to comment.