cs-codex-dist-tests/DistTestCore/Logs/LogDownloadHandler.cs

31 lines
737 B
C#
Raw Normal View History

2023-04-13 09:30:19 +00:00
using KubernetesWorkflow;
using Logging;
2023-04-14 07:54:07 +00:00
namespace DistTestCore.Logs
2023-04-13 09:30:19 +00:00
{
public class LogDownloadHandler : LogHandler, ILogHandler
2023-04-13 09:30:19 +00:00
{
private readonly OnlineCodexNode node;
2023-04-13 09:30:19 +00:00
private readonly LogFile log;
public LogDownloadHandler(OnlineCodexNode node, string description, LogFile log)
2023-04-13 09:30:19 +00:00
{
this.node = node;
2023-04-13 09:30:19 +00:00
this.log = log;
log.Write($"{description} -->> {log.FullFilename}");
log.WriteRaw(description);
2023-04-13 09:30:19 +00:00
}
public CodexNodeLog CreateCodexNodeLog()
{
return new CodexNodeLog(log, node);
2023-04-13 09:30:19 +00:00
}
protected override void ProcessLine(string line)
2023-04-13 09:30:19 +00:00
{
log.WriteRaw(line);
2023-04-13 09:30:19 +00:00
}
}
}