13 instantiations of LogLine
Aspire.Hosting (1)
ApplicationModel\ResourceLoggerService.cs (1)
892logs[i] = new LogLine(lineNumber, content, entry.Type == LogEntryType.Error);
Aspire.Hosting.DevTunnels (1)
DevTunnelMonitor.cs (1)
144await ApplyLogsAsync(run, [new(1, content, false)]).ConfigureAwait(false);
Aspire.Hosting.EntityFrameworkCore.Tests (11)
EFCoreOperationExecutorTests.cs (11)
24var logs = CreateLogEntries(new LogLine(1, "error: Unhandled exception: Unable to load the service index for source", false)); 41var logs = CreateLogEntries(new LogLine(1, "info: Migration applied successfully.", false)); 58var logs = CreateLogEntries(new LogLine(1, "data: [{\"id\":\"20240101\",\"name\":\"Init\"}]", false)); 73var logs = CreateLogEntries(new LogLine(1, "Something failed", true)); 90new LogLine(1, "info: Starting migration...", false), 91new LogLine(2, "error: NuGet restore failed", false), 92new LogLine(3, "data: {}", false), 93new LogLine(4, "warn: Deprecated warning", false)); 110var logs = CreateLogEntries(new LogLine(1, "verbose: Loaded assembly from cache", false)); 127new LogLine(1, "info: Applying migration '20240101_Init'...", false), 128new LogLine(2, "info: Done.", false));
110 references to LogLine
Aspire.Hosting (23)
ApplicationModel\CommandsConfigurationExtensions.cs (1)
515foreach (var line in batch)
ApplicationModel\ResourceLoggerService.cs (15)
157public IAsyncEnumerable<IReadOnlyList<LogLine>> GetAllAsync(IResource resource) 177public IAsyncEnumerable<IReadOnlyList<LogLine>> WatchAsync(IResource resource) 197public IAsyncEnumerable<IReadOnlyList<LogLine>> GetAllAsync(string resourceName) 209public IAsyncEnumerable<IReadOnlyList<LogLine>> WatchAsync(string resourceName) 216internal IDisposable Subscribe(string resourceName, Action<IReadOnlyList<LogLine>> onLogs) 327private static async IAsyncEnumerable<IReadOnlyList<LogLine>> CombineMultipleAsync(string[] resourceNames, Func<string, IAsyncEnumerable<IReadOnlyList<LogLine>>> fetch) 329var channel = Channel.CreateUnbounded<IReadOnlyList<LogLine>>(); 462public async IAsyncEnumerable<IReadOnlyList<LogLine>> GetAllAsync(IConsoleLogsService consoleLogsService, [EnumeratorCancellation] CancellationToken cancellationToken = default) 485public async IAsyncEnumerable<IReadOnlyList<LogLine>> WatchAsync([EnumeratorCancellation] CancellationToken cancellationToken = default) 538public IDisposable Subscribe(Action<IReadOnlyList<LogLine>> onLogs) 566IReadOnlyList<LogLine>? logLines = null; 607var batches = new List<IReadOnlyList<LogLine>>(); 880private static LogLine[] CreateLogLines(ref int lineNumber, IReadOnlyList<LogEntry> entries) 882var logs = new LogLine[entries.Count];
Backchannel\AuxiliaryBackchannelRpcTarget.cs (1)
1675foreach (var logLine in batch)
Dashboard\DashboardEventHandlers.cs (1)
816foreach (var logLine in batch)
Dashboard\DashboardServiceData.cs (4)
165internal IAsyncEnumerable<IReadOnlyList<LogLine>>? SubscribeConsoleLogs(string resourceName) 171async IAsyncEnumerable<IReadOnlyList<LogLine>> Enumerate([EnumeratorCancellation] CancellationToken cancellationToken = default) 182internal IAsyncEnumerable<IReadOnlyList<LogLine>>? GetConsoleLogs(string resourceName) 188async IAsyncEnumerable<IReadOnlyList<LogLine>> Enumerate([EnumeratorCancellation] CancellationToken cancellationToken = default)
ResourceLoggerForwarderService.cs (1)
72foreach (var line in logEvent)
Aspire.Hosting.Browsers.Tests (8)
BrowserLogsBuilderExtensionsTests.cs (3)
1684var log = Assert.Single(logs); 1725var log = Assert.Single(logs); 1765private static Task<IReadOnlyList<LogLine>> CaptureLogsAsync(ResourceLoggerService resourceLoggerService, string resourceName, Action writeLogs) =>
ConsoleLoggingTestHelpers.cs (5)
13public static async Task<IReadOnlyList<LogLine>> CaptureLogsAsync(ResourceLoggerService service, string resourceName, int targetLogCount, Action writeLogs) 36public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerable<IReadOnlyList<LogLine>> watchEnumerable, int targetLogCount) 40var logs = new List<LogLine>(); 50return (IReadOnlyList<LogLine>)logs;
Aspire.Hosting.DevTunnels (2)
DevTunnelMonitor.cs (2)
462private async Task ApplyLogsAsync(Run run, IReadOnlyList<LogLine> batch) 465foreach (var entry in batch)
Aspire.Hosting.DevTunnels.Tests (1)
TestDevTunnelMonitor.cs (1)
98public async Task<IReadOnlyList<LogLine>> LogsAsync(IResource? resource = null)
Aspire.Hosting.Dotnet (1)
DotnetProjectBuildCoordinator.cs (1)
322foreach (var logLine in batch)
Aspire.Hosting.Dotnet.Tests (2)
DotnetProjectBuildCoordinatorTests.cs (2)
5169private static async Task<IReadOnlyList<LogLine>> ReadLogsAsync( 5175var logs = new List<LogLine>();
Aspire.Hosting.EntityFrameworkCore (2)
EFCoreOperationExecutor.cs (2)
476IAsyncEnumerable<IReadOnlyList<LogLine>> logChannel, 485foreach (var entry in entries)
Aspire.Hosting.EntityFrameworkCore.Tests (2)
EFCoreOperationExecutorTests.cs (2)
232private static async IAsyncEnumerable<IReadOnlyList<LogLine>> CreateLogEntries(params LogLine[] lines)
Aspire.Hosting.Testing.Tests (11)
tests\Aspire.Hosting.TestUtilities\Utils\LoggerNotificationExtensions.cs (1)
164foreach (var line in logEvent)
tests\Shared\ConsoleLogging\ConsoleLoggingTestHelpers.cs (10)
10public static async Task<IReadOnlyList<LogLine>> CaptureLogsAsync(ResourceLoggerService service, string resourceName, int targetLogCount, Action writeLogs) 33public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(ResourceLoggerService service, int targetLogCount, IResource resource) 39public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerable<IReadOnlyList<LogLine>> watchEnumerable, int targetLogCount) 43var logs = new List<LogLine>(); 52return (IReadOnlyList<LogLine>)logs; 56public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerator<IReadOnlyList<LogLine>> watchEnumerator, int targetLogCount) 60var logs = new List<LogLine>(); 70return (IReadOnlyList<LogLine>)logs;
Aspire.Hosting.Tests (56)
Dcp\DcpExecutorTests.cs (24)
2470var logLine = watchLogsEnumerator.Current.Single(); 2646var logLines = new ConcurrentQueue<LogLine>(); 2649foreach (var logLine in batch) 2708var logLines = new ConcurrentQueue<LogLine>(); 2718foreach (var logLine in batch) 2772var logLines = new List<LogLine>(); 2962var logLines = new ConcurrentQueue<LogLine>(); 2973foreach (var logLine in batch) 3043var logLines = new List<LogLine>(); 3127var logLines = new ConcurrentQueue<LogLine>(); 3137foreach (var logLine in batch) 3222var logLines = new ConcurrentQueue<LogLine>(); 3325void AddLogLines(IReadOnlyList<LogLine> batch) 3327foreach (var logLine in batch) 3378var logLines = new ConcurrentQueue<LogLine>(); 3477void AddLogLines(IReadOnlyList<LogLine> batch) 3479foreach (var logLine in batch) 3816var logLines = new ConcurrentQueue<LogLine>(); 3854foreach (var logLine in batch) 8059var logLines = new List<LogLine>(); 9472var logLines = new List<LogLine>(); 9978var logLines = new List<LogLine>(); 10065var logLines = new List<LogLine>(); 11105var logLines = new List<LogLine>();
Health\ResourceHealthCheckServiceTests.cs (1)
675var errorLine = batch.FirstOrDefault(l => l.IsErrorMessage && l.Content.Contains("ResourceReadyEvent subscriber for 'resource' failed."));
Lifecycle\TerminalHostFailureDiagnosticServiceTests.cs (3)
271private static async Task<IReadOnlyList<LogLine>> ReadLogsAsync(ResourceLoggerService loggers, IResource host, int expected, int? timeoutMs = null) 273var collected = new List<LogLine>(); 279foreach (var line in batch)
Orchestrator\ParameterProcessorTests.cs (3)
507var logEntry = logs[0]; 531var logEntry = logs[0]; 574var logEntry = logs[0];
ResourceLoggerServiceTests.cs (15)
291var allLogs = new List<LogLine>(); 317var logLines = new List<LogLine>(); 352var logLines = new List<LogLine>(); 384var logLines = new List<LogLine>(); 490var allLogs = new List<LogLine>(); 496var logLine = Assert.Single(allLogs); 507var logLines = new List<LogLine>(); 550var logLines = new List<LogLine>(); 604foreach (var line in batch) 625foreach (var line in batch) 683var logs = new List<LogLine>(); 688return (IReadOnlyList<LogLine>)logs; 717var logs = new List<LogLine>(); 722return (IReadOnlyList<LogLine>)logs; 813IAsyncEnumerator<IReadOnlyList<LogLine>>? logs = null;
tests\Shared\ConsoleLogging\ConsoleLoggingTestHelpers.cs (10)
10public static async Task<IReadOnlyList<LogLine>> CaptureLogsAsync(ResourceLoggerService service, string resourceName, int targetLogCount, Action writeLogs) 33public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(ResourceLoggerService service, int targetLogCount, IResource resource) 39public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerable<IReadOnlyList<LogLine>> watchEnumerable, int targetLogCount) 43var logs = new List<LogLine>(); 52return (IReadOnlyList<LogLine>)logs; 56public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerator<IReadOnlyList<LogLine>> watchEnumerator, int targetLogCount) 60var logs = new List<LogLine>(); 70return (IReadOnlyList<LogLine>)logs;
Aspire.Hosting.TestUtilities (1)
Utils\LoggerNotificationExtensions.cs (1)
164foreach (var line in logEvent)
Aspire.Playground.Tests (1)
tests\Aspire.Hosting.TestUtilities\Utils\LoggerNotificationExtensions.cs (1)
164foreach (var line in logEvent)