Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nathanwoctopusdeploy
Copy link
Contributor

Background

Port TraceLogFileLogger from Halibut

How to review this PR

Quality ✔️

Pre-requisites

  • I have read How we use GitHub Issues for help deciding when and where it's appropriate to make an issue.
  • I have considered informing or consulting the right people, according to the ownership map.
  • I have considered appropriate testing for my change.


using System.Diagnostics.CodeAnalysis;

[assembly: SuppressMessage("Style", "VSTHRD200:Use \"Async\" suffix for async methods", Justification = "Test code")]
Copy link
Contributor Author

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();
Copy link
Contributor Author

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");
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep
image

+:artifacts/trace-logs/**/* => trace-logs

in each build config

@nathanwoctopusdeploy nathanwoctopusdeploy force-pushed the sast/port-TraceLogFileLogger-from-Halibut branch from 937583f to bbe19b3 Compare December 19, 2023 05:23
@nathanwoctopusdeploy nathanwoctopusdeploy force-pushed the sast/port-TraceLogFileLogger-from-Halibut branch from bbe19b3 to c1eb30a Compare December 19, 2023 05:37
@sburmanoctopus sburmanoctopus removed their request for review January 24, 2024 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants