Convert global loggers to Thread local loggers#3
Convert global loggers to Thread local loggers#3sachintaMSFT wants to merge 11 commits intomasterfrom
Conversation
…consturction to a public method within TelemetryTraceLogging.
|
|
||
| virtual void SetExecutionStage(Workflow::ExecutionStage stage, bool); | ||
|
|
||
| void SetThreadLocalThreadGlobals(); |
There was a problem hiding this comment.
This will need to return the internal RAII type that ThreadGlobals will return from its SetActive type function.
| if (IsTelemetryEnabled()) | ||
| { | ||
| TraceLoggingWriteActivity(g_hTelemetryProvider, | ||
| TraceLoggingWriteActivity(g_hTraceProvider, |
There was a problem hiding this comment.
Why update all of these lines just to change the global name? What value is there in changing the name of the global?
There was a problem hiding this comment.
The value is not in any better functionality but in it communicating truly what it is. The provider is NOW not only used for logging Telemetry but Diagnostic events as well.
| // ILogger | ||
| virtual std::string GetName() const override; | ||
|
|
||
| virtual void Write(Channel channel, Level level, std::string_view message) noexcept override; |
| // Send to a string first to create a single block to write to a file. | ||
| std::stringstream strstr; | ||
| strstr << std::chrono::system_clock::now() << " [" << std::setw(GetMaxChannelNameLength()) << std::left << std::setfill(' ') << GetChannelName(channel) << "] " << message; | ||
|
|
There was a problem hiding this comment.
Will remove the extra line!
| TelemetryTraceLogger& Telemetry(); | ||
|
|
||
| // Turns on wil failure telemetry and logging. | ||
| void EnableWilFailureTelemetry(); |
There was a problem hiding this comment.
Will revert the location of this method's declaration to reflect no change to this method!
| }; | ||
|
|
||
| // Turns on wil failure telemetry and logging. | ||
| void EnableWilFailureTelemetry(); |
There was a problem hiding this comment.
Will revert the location of this method's declaration to reflect no change to this method!
| virtual std::string GetName() const override; | ||
| virtual void Write(Channel channel, Level, std::string_view message) noexcept override; | ||
| }; | ||
| } No newline at end of file |
There was a problem hiding this comment.
Will add new line at the end of the file
src/WinGetUtil/Exports.cpp
Outdated
| AppInstaller::Logging::Log().EnableChannel(AppInstaller::Logging::Channel::All); | ||
| AppInstaller::Logging::Log().SetLevel(AppInstaller::Logging::Level::Verbose); | ||
| AppInstaller::Logging::EnableWilFailureTelemetry(); | ||
| AppInstaller::Logging::Telemetry().SetUserSettingsStatus(); |
There was a problem hiding this comment.
Missed this! Will remove this call !
…ght and Address spelligs
No description provided.