2
0
mirror of synced 2025-01-12 01:24:23 +00:00
cs-codex-dist-tests/DistTestCore/Logs/LogDownloadHandler.cs
2023-06-27 15:28:00 +02:00

31 lines
764 B
C#

using KubernetesWorkflow;
using Logging;
namespace DistTestCore.Logs
{
public class LogDownloadHandler : LogHandler, ILogHandler
{
private readonly RunningContainer container;
private readonly LogFile log;
public LogDownloadHandler(RunningContainer container, string description, LogFile log)
{
this.container = container;
this.log = log;
log.Write($"{description} -->> {log.FullFilename}");
log.WriteRaw(description);
}
public DownloadedLog DownloadLog()
{
return new DownloadedLog(log, container.Name);
}
protected override void ProcessLine(string line)
{
log.WriteRaw(line);
}
}
}