mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-01-06 07:23:07 +00:00
29 lines
640 B
C#
29 lines
640 B
C#
using Logging;
|
|
|
|
namespace DistTestCore.Logs
|
|
{
|
|
public abstract class BaseTestLog : BaseLog
|
|
{
|
|
private bool hasFailed;
|
|
private readonly string deployId;
|
|
|
|
protected BaseTestLog(string deployId)
|
|
{
|
|
this.deployId = deployId;
|
|
}
|
|
|
|
public void WriteLogTag()
|
|
{
|
|
var category = NameUtils.GetCategoryName();
|
|
var name = NameUtils.GetTestMethodName();
|
|
LogFile.WriteRaw($"{deployId} {category} {name}");
|
|
}
|
|
|
|
public void MarkAsFailed()
|
|
{
|
|
if (hasFailed) return;
|
|
hasFailed = true;
|
|
}
|
|
}
|
|
}
|