2 instantiations of LogEntry
Aspire.Hosting (2)
src\Shared\ConsoleLogs\LogEntry.cs (2)
28return new LogEntry 48return new LogEntry
43 references to LogEntry
Aspire.Hosting (33)
ApplicationModel\ResourceLoggerService.cs (15)
142internal Action<LogEntry> GetInternalLogger(string resourceName) 348private readonly CircularBuffer<LogEntry> _inMemoryEntries = new(MaxLogCount); 395List<LogEntry> inMemoryEntries; 419var channel = Channel.CreateUnbounded<LogEntry>(); 424void Log(LogEntry log) => channel.Writer.TryWrite(log); 426LogEntry[] backlogSnapshot; 435foreach (var logEntry in _inMemoryEntries) 477private Action<LogEntry>? _onNewLog; 478private event Action<LogEntry> OnNewLog 539internal LogEntry[] GetBacklogSnapshot() 547public void AddLog(LogEntry logEntry, bool inMemorySource) 588loggerState.AddLog(LogEntry.Create(logTime, logMessage, isErrorMessage), inMemorySource: true); 593private static LogLine[] CreateLogLines(ref int lineNumber, IReadOnlyList<LogEntry> entries) 598var entry = entries[i]; 619public IAsyncEnumerable<IReadOnlyList<LogEntry>> GetAllLogsAsync(string resourceName, CancellationToken cancellationToken)
Dcp\DcpExecutor.cs (6)
445public async IAsyncEnumerable<IReadOnlyList<LogEntry>> GetAllLogsAsync(string resourceName, [EnumeratorCancellation] CancellationToken cancellationToken) 461var logs = new List<LogEntry>(); 462foreach (var logEntry in CreateLogEntries(batch)) 472private static IEnumerable<LogEntry> CreateLogEntries(IReadOnlyList<(string, bool)> batch) 485yield return LogEntry.Create(timestamp, resolvedContent, content, isError); 524foreach (var logEntry in CreateLogEntries(batch))
IConsoleLogsService.cs (1)
8IAsyncEnumerable<IReadOnlyList<LogEntry>> GetAllLogsAsync(string resourceName, CancellationToken cancellationToken);
src\Shared\ConsoleLogs\LogEntries.cs (8)
19private readonly CircularBuffer<LogEntry> _logEntries = new(maximumEntryCount); 27public IList<LogEntry> GetEntries() => _logEntries; 45foreach (var pauseEntry in pauseEntries) 60public bool ProcessPauseFilters(LogEntry logEntry) 83public void InsertSorted(LogEntry logLine) 99var entry = _logEntries[i]; 114private void InsertSortedCore(LogEntry logEntry) 126var current = _logEntries[rowIndex];
src\Shared\ConsoleLogs\LogEntry.cs (3)
26public static LogEntry CreatePause(DateTime startTimestamp, DateTime? endTimestamp = null) 41public static LogEntry Create(DateTime? timestamp, string logMessage, bool isErrorMessage) 46public static LogEntry Create(DateTime? timestamp, string logMessage, string rawLogContent, bool isErrorMessage)
Aspire.Hosting.Tests (10)
Dashboard\DashboardLifecycleHookTests.cs (1)
64dashboardLoggerState.AddLog(LogEntry.Create(timestamp, logMessage, isErrorMessage: false), inMemorySource: true);
Dashboard\DashboardServiceTests.cs (2)
35var getConsoleLogsChannel = Channel.CreateUnbounded<IReadOnlyList<LogEntry>>(); 75await getConsoleLogsChannel.Writer.WriteAsync([LogEntry.Create(null, "Test3", isErrorMessage: false)]);
ResourceLoggerServiceTests.cs (4)
262var consoleLogsChannel0 = Channel.CreateUnbounded<IReadOnlyList<LogEntry>>(); 263consoleLogsChannel0.Writer.TryWrite([LogEntry.Create(timestamp: null, logMessage: "instance0!", isErrorMessage: false)]); 266var consoleLogsChannel1 = Channel.CreateUnbounded<IReadOnlyList<LogEntry>>(); 267consoleLogsChannel1.Writer.TryWrite([LogEntry.Create(timestamp: null, logMessage: "instance1!", isErrorMessage: false)]);
Utils\TestConsoleLogsService.cs (3)
12private readonly Func<string, Channel<IReadOnlyList<LogEntry>>>? _getConsoleLogsChannel; 14public TestConsoleLogsService(Func<string, Channel<IReadOnlyList<LogEntry>>>? getConsoleLogsChannel = null) 19public async IAsyncEnumerable<IReadOnlyList<LogEntry>> GetAllLogsAsync(string resourceName, [EnumeratorCancellation] CancellationToken cancellationToken)