-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port TraceLogFileLogger from Halibut #750
base: main
Are you sure you want to change the base?
Port TraceLogFileLogger from Halibut #750
Conversation
|
||
using System.Diagnostics.CodeAnalysis; | ||
|
||
[assembly: SuppressMessage("Style", "VSTHRD200:Use \"Async\" suffix for async methods", Justification = "Test code")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Referencing added some additional code analysis
var testName = ""; | ||
if (TeamCityDetection.IsRunningInTeamCity()) | ||
var testName = TestContext.CurrentContext.Test.FullName; | ||
var testHash = CurrentTestHash(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ported the TestHash with this change as well as it's a good change to reduce log line length
var currentDirectory = Directory.GetCurrentDirectory(); | ||
var rootDirectory = new DirectoryInfo(currentDirectory).Parent!.Parent!.Parent!.Parent!.Parent!; | ||
|
||
var traceLogsDirectory = rootDirectory.CreateSubdirectory("artifacts").CreateSubdirectory("trace-logs"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will need to tell teamcity to capture this directory as an artifact.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that done in the team city build configuration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
937583f
to
bbe19b3
Compare
bbe19b3
to
c1eb30a
Compare
Background
Port TraceLogFileLogger from Halibut
How to review this PR
Quality ✔️
Pre-requisites