Fixed not working logging mechanism on Windows #123
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixed linker errors on Windows when turned on logging (made the
LogDispatcher::Proxy
class public on Windows, as the logging API is actually used by external applications).Fixed crashing time formatting on Windows (The used
%T
formatting is probably nonportable; used the equivalent on Windows%X
).Used direct constructor call when returning Proxy value from a helper function. Most likely the syntax of creating and returning a local variable was widely expanded on MSVC in debug mode, so the destructor was called in wrong place and caused that an empty message was displayed in the logs. Now when using the direct constructor call syntax, the temporary object is created outside the function so the destructor is called directly in the instruction starting from
LOGC
. This was a wrong prediction of behavior that was previously highly compiler-option dependent; this fixed one is independent on any implementation-dependent copy elision rules.