Skip to content

Commit

Permalink
Add a comment warning future people about potential weird behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebandit21 committed Apr 20, 2024
1 parent de8f794 commit 609b360
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Core/Misc/PlogLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ PlogLogger::PlogLogger() {
}

void PlogLogger::log(Core::ILogger::Severity logLevel, const std::string_view message) {
/* Note: If multiple PlogLogger objects exist in the same thread, this last-message log suppression
* will persist across calls to log between different instances. This may or may not be desired,
* if this hypothetical scenario ever happens, consider :)
*/
static thread_local std::string last_message = "";
static thread_local Core::ILogger::Severity last_log_level;
static thread_local unsigned num_occurrences = 0;
Expand Down

0 comments on commit 609b360

Please sign in to comment.