mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-01-03 14:03:09 +00:00
30 lines
670 B
C#
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");
|
|
}
|
|
}
|
|
}
|