Skip to content

Commit f97f64e

Browse files
CopilotJamesNK
andauthored
Format LogsCommand timestamps with [dim] markup (#17066)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
1 parent 2ee7d1b commit f97f64e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Aspire.Cli/Commands/LogsCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,8 @@ private void OutputLogLine(LogEntry entry, OutputFormat format, bool timestamps)
465465
// Colorized output: assign a consistent color to each resource
466466
var color = _resourceColorMap.GetColor(displayName);
467467
var escapedContent = displayContent.EscapeMarkup();
468-
_interactionService.DisplayMarkupLine($"{timestampPrefix.EscapeMarkup()}[{color}][[{displayName.EscapeMarkup()}]][/] {escapedContent}");
468+
var dimTimestamp = timestampPrefix.Length > 0 ? $"[dim]{timestampPrefix.EscapeMarkup()}[/]" : string.Empty;
469+
_interactionService.DisplayMarkupLine($"{dimTimestamp}[{color}][[{displayName.EscapeMarkup()}]][/] {escapedContent}");
469470
}
470471
}
471472

0 commit comments

Comments
 (0)