2
0
mirror of synced 2025-02-03 12:13:48 +00:00
2023-09-20 10:51:47 +02:00

30 lines
670 B
C#

using Logging;
namespace DistTestCore.Logs
{
public abstract class BaseTestLog : BaseLog
{
private bool hasFailed;
public BaseTestLog(bool debug)
: base(debug)
{
}
public void WriteLogTag()
{
var runId = NameUtils.GetRunId();
var category = NameUtils.GetCategoryName();
var name = NameUtils.GetTestMethodName();
LogFile.WriteRaw($"{runId} {category} {name}");
}
public void MarkAsFailed()
{
if (hasFailed) return;
hasFailed = true;
LogFile.ConcatToFilename("_FAILED");
}
}
}