Skip to content

Commit bf05675

Browse files
committed
M
1 parent a4f2a36 commit bf05675

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Apps/LogExporterApp/App.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public Task InitializeAsync(IDnsServer dnsServer, string config)
123123
_config = AppConfig.Deserialize(config)
124124
?? throw new DnsClientException("Invalid application configuration.");
125125

126-
ConfigureStrategies();
126+
ConfigureExport();
127127

128128
// If no sinks exist, never enable logging.
129129
if (!_exportManager.HasStrategy())
@@ -204,7 +204,7 @@ private async Task BackgroundWorkerAsync(CancellationToken token)
204204

205205
if (batch.Count > 0)
206206
{
207-
await _exportManager.ImplementStrategyAsync(batch, token).ConfigureAwait(false);
207+
await _exportManager.UseStrategyAsync(batch, token).ConfigureAwait(false);
208208
batch.Clear(); // REUSE — do not reassign
209209
}
210210
}
@@ -220,7 +220,7 @@ private async Task BackgroundWorkerAsync(CancellationToken token)
220220
}
221221
}
222222

223-
private void ConfigureStrategies()
223+
private void ConfigureExport()
224224
{
225225
_exportManager.RemoveStrategy(typeof(ConsoleExportStrategy));
226226
if (_config!.ConsoleTarget != null && _config.ConsoleTarget.Enabled)
@@ -256,14 +256,14 @@ private async Task DrainRemainingLogs(List<LogEntry> batch, CancellationToken to
256256

257257
if (batch.Count >= BULK_INSERT_COUNT)
258258
{
259-
await _exportManager.ImplementStrategyAsync(batch, token).ConfigureAwait(false);
259+
await _exportManager.UseStrategyAsync(batch, token).ConfigureAwait(false);
260260
batch.Clear(); // reuse instead of creating new list
261261
}
262262
}
263263

264264
if (batch.Count > 0 && !token.IsCancellationRequested)
265265
{
266-
await _exportManager.ImplementStrategyAsync(batch, token).ConfigureAwait(false);
266+
await _exportManager.UseStrategyAsync(batch, token).ConfigureAwait(false);
267267
batch.Clear();
268268
}
269269
}

Apps/LogExporterApp/Strategy/ExportManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public bool HasStrategy()
9393
/// continues after shutdown. Strategies are responsible for honoring
9494
/// cancellation so shutdown stays bounded.
9595
/// </summary>
96-
public async Task ImplementStrategyAsync(IReadOnlyList<LogEntry> logs, CancellationToken token)
96+
public async Task UseStrategyAsync(IReadOnlyList<LogEntry> logs, CancellationToken token)
9797
{
9898
if (_disposed || logs == null || logs.Count == 0 || _exportStrategies.IsEmpty)
9999
return;

0 commit comments

Comments
 (0)