-
Notifications
You must be signed in to change notification settings - Fork 0
Convert global loggers to Thread local loggers #3
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
base: master
Are you sure you want to change the base?
Conversation
…consturction to a public method within TelemetryTraceLogging.
|
|
||
| virtual void SetExecutionStage(Workflow::ExecutionStage stage, bool); | ||
|
|
||
| void SetThreadLocalThreadGlobals(); |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; |
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.
Will fix this!
| // 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove the extra line!
| TelemetryTraceLogger& Telemetry(); | ||
|
|
||
| // Turns on wil failure telemetry and logging. | ||
| void EnableWilFailureTelemetry(); |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed this! Will remove this call !
…ght and Address spelligs
No description provided.