Adds category to status log. Updates timestamp format

This commit is contained in:
benbierens 2023-07-18 13:18:26 +02:00
parent 07776dc6fb
commit d6d32bf8e6
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
2 changed files with 4 additions and 2 deletions

View File

@ -49,7 +49,7 @@
private static string GetTimestamp()
{
return $"[{DateTime.UtcNow.ToString("u")}]";
return $"[{DateTime.UtcNow.ToString("o")}]";
}
private void EnsurePathExists(string filename)

View File

@ -20,11 +20,12 @@ namespace Logging
{
Write(new StatusLogJson
{
time = DateTime.UtcNow.ToString("u"),
time = DateTime.UtcNow.ToString("o"),
runid = NameUtils.GetRunId(),
status = resultStatus,
testid = NameUtils.GetTestId(),
codexid = codexId,
category = NameUtils.GetCategoryName(),
fixturename = fixtureName,
testname = NameUtils.GetTestMethodName()
});
@ -53,6 +54,7 @@ namespace Logging
public string status { get; set; } = string.Empty;
public string testid { get; set; } = string.Empty;
public string codexid { get; set; } = string.Empty;
public string category { get; set; } = string.Empty;
public string fixturename { get; set; } = string.Empty;
public string testname { get; set; } = string.Empty;
}