-
|
I want to add custom MTP logger that forward log to Open Telemetry Logs. But it seems not possible. Because logger related class is defined as internal. Is there any extension points to customize MTP logging behaviors? |
Beta Was this translation helpful? Give feedback.
Answered by
filzrev
Aug 19, 2025
Replies: 1 comment 1 reply
-
|
What you are looking for is a reporter, not a logger. Reporters in MTP are the equivalent of loggers in VSTest. We have a sample here (permalink) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MTP logs that are written with
ILoggerinterface seems not send to MessageBus.So it can't write custom reporter that handle log message.
I found there is ILoggingManager::AddProvider is exposed as experimental feature.
I've confirmed it can write custom logger that forward MTP logs to
Microsoft.Extension.Loggingbased logger.(Except for TestApplication logs. These logs are written with
FileLoggerProviderand LoggerFactory is not used.)