mirror of
https://github.com/codex-storage/cs-codex-dist-tests.git
synced 2025-02-13 12:36:29 +00:00
24 lines
524 B
C#
24 lines
524 B
C#
|
namespace KubernetesWorkflow
|
|||
|
{
|
|||
|
public interface ILogHandler
|
|||
|
{
|
|||
|
void Log(Stream log);
|
|||
|
}
|
|||
|
|
|||
|
public abstract class LogHandler : ILogHandler
|
|||
|
{
|
|||
|
public void Log(Stream log)
|
|||
|
{
|
|||
|
using var reader = new StreamReader(log);
|
|||
|
var line = reader.ReadLine();
|
|||
|
while (line != null)
|
|||
|
{
|
|||
|
ProcessLine(line);
|
|||
|
line = reader.ReadLine();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
protected abstract void ProcessLine(string line);
|
|||
|
}
|
|||
|
}
|