Skip to content

Commit

Permalink
ResourceLoggerForwarderService.cs: is being used in Aspire.Hosting.Te…
Browse files Browse the repository at this point in the history
…sts also now, so fix build by fully qualifying some types
  • Loading branch information
radical committed Aug 6, 2024
1 parent c289272 commit 4938cb3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Aspire.Hosting.Testing/ResourceLoggerForwarderService.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Aspire.Hosting.ApplicationModel;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

Expand All @@ -11,8 +10,8 @@ namespace Aspire.Hosting.Testing;
/// A background service that watches resource logs and forwards them to the host's <see cref="ILogger"/> infrastructure.
/// </summary>
internal sealed class ResourceLoggerForwarderService(
ResourceNotificationService resourceNotificationService,
ResourceLoggerService resourceLoggerService,
ApplicationModel.ResourceNotificationService resourceNotificationService,
ApplicationModel.ResourceLoggerService resourceLoggerService,
IHostEnvironment hostEnvironment,
ILoggerFactory loggerFactory)
: BackgroundService
Expand Down Expand Up @@ -49,7 +48,7 @@ private async Task WatchNotifications(CancellationToken cancellationToken)
await Task.WhenAll(logWatchTasks).ConfigureAwait(false);
}

private async Task WatchResourceLogs(IResource resource, string resourceId, CancellationToken cancellationToken)
private async Task WatchResourceLogs(ApplicationModel.IResource resource, string resourceId, CancellationToken cancellationToken)
{
var applicationName = hostEnvironment.ApplicationName;
var logger = loggerFactory.CreateLogger($"{applicationName}.Resources.{resource.Name}");
Expand Down

0 comments on commit 4938cb3

Please sign in to comment.