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

Add Logging #22

Open
Siphonophora opened this issue Jul 25, 2021 · 2 comments
Open

Add Logging #22

Siphonophora opened this issue Jul 25, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@Siphonophora
Copy link
Contributor

Siphonophora commented Jul 25, 2021

In any case, it seems like we should probably pull the logger from this and get the mstest fix released?

+1 to separating the logger. I think the logger may be a higher priority need since it is impacting your productivity (let me know if I got the priority order incorrect). Let's get that released right away. Two thoughts on the logger:

  1. Could we expose logger as part of ITestRun e.g. ITestRun.IDebugLogger? It will be available to most of the workflows, and if needed we can pass the reference to data structures like TestResultInfo. This will help inject a testable/noop logger for unit tests.
  2. Instead of exposing a key specific to our TestLoggers, can we depend on the test platform trace infra? See https://github.com/microsoft/vstest-docs/blob/main/docs/diagnose.md#collect-traces-using-command-line and the way to use it will be to use EqtTrace.* methods in our IDebugLogger implementation. See https://github.com/microsoft/vstest/blob/main/src/Microsoft.TestPlatform.CoreUtilities/Tracing/EqtTrace.cs#L24. All logs will get written into the log.txt we provide while invoking dotnet test.

I'm curious if the debugging TestLogger will be solved if we include the symbols together with nuget package (portable symbols or otherwise), that will enable stepping into code just like we could do earlier with JunitTestLogger itself. What do you think?

Originally posted by @codito in #21 (comment)

@Siphonophora
Copy link
Contributor Author

I thought I had replied a while ago.

  1. I'm fine with putting the logger on the interfaces instead of having it static.
  2. This sounds good too.

Because we are usually having mstest run the loggers, I'm not sure if the pdb would help. At least, I'm not sure how we would attach a debugger to that process, so we could step through it.

@codito
Copy link
Contributor

codito commented Jul 26, 2021

Created #23 for the embedded symbols and source code. It should allow us to step through the Testlogger APIs in debugger without cloning repo, doing a debug build etc.

@codito codito added enhancement New feature or request logger: core Core test logger related issues and removed logger: core Core test logger related issues labels Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants