Skip to content

Commit

Permalink
some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos committed Aug 3, 2023
1 parent bd46c1d commit 8cd4420
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/ylt/easylog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class logger {
}
}

Severity min_severity_;
Severity min_severity_ = Severity::TRACE;
bool async_ = false;
bool enable_console_ = true;
appender *appender_ = nullptr;
Expand Down
4 changes: 1 addition & 3 deletions include/ylt/easylog/appender.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ class appender {
if (queue_.try_dequeue(record)) {
enable_console_ ? write_record<false, true>(record)
: write_record<false, false>(record);
}

if (queue_.size_approx() == 0) {
}else {
std::unique_lock lock(que_mtx_);
cnd_.wait(lock, [&]() {
return queue_.size_approx() > 0 || stop_;
Expand Down

0 comments on commit 8cd4420

Please sign in to comment.