Skip to content

Commit

Permalink
less noise
Browse files Browse the repository at this point in the history
  • Loading branch information
flin-8 committed Mar 14, 2024
1 parent 7d96310 commit c211a35
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ public async Task<bool> StreamPodLogsToScriptLog(IScriptLogWriter writer, Cancel
Stopwatch stdoutWatch = Stopwatch.StartNew();
//open the file streams for reading
using var stdOutStream = await SafelyOpenLogStreamReader("stdout.log", cancellationToken, writer);
writer.WriteOutput(ProcessOutputSource.StdOut, $"Opening streams for stdout logs took: {stdoutWatch.Elapsed} (FinalRead: {isFinalRead})");
writer.WriteOutput(ProcessOutputSource.Debug, $"Opening streams for stdout logs took: {stdoutWatch.Elapsed} (FinalRead: {isFinalRead})");

Stopwatch stderrWatch = Stopwatch.StartNew();
using var stdErrStream = await SafelyOpenLogStreamReader("stderr.log", cancellationToken, writer);
writer.WriteOutput(ProcessOutputSource.StdOut, $"Opening streams for stderr logs took: {stderrWatch.Elapsed} (FinalRead: {isFinalRead})");

//if either of these is null, just return
if (stdOutStream is null || stdErrStream is null)
Expand Down Expand Up @@ -84,7 +82,7 @@ public async Task<bool> StreamPodLogsToScriptLog(IScriptLogWriter writer, Cancel
writer.WriteOutput(logLine.Source, logLineMessage, logLine.Occurred);
}

writer.WriteOutput(ProcessOutputSource.StdOut, $"{DateTimeOffset.UtcNow}, Reading logs took: {watch.Elapsed}");
//writer.WriteOutput(ProcessOutputSource.StdOut, $"{DateTimeOffset.UtcNow}, Reading logs took: {watch.Elapsed}");
//wait for 250ms before reading the logs again (except on the final read)
if (!isFinalRead)
{
Expand Down

0 comments on commit c211a35

Please sign in to comment.