@@ -45,20 +45,20 @@ class ConsoleLogger : public dotnamecpp::logging::ILogger {
4545 ConsoleLogger (ConsoleLogger&& other) noexcept : logFile_ (std::move (other.logFile_)),
4646 addNewLine_ (other.addNewLine_) {
4747 }
48-
49- ConsoleLogger& operator =(ConsoleLogger&& other) noexcept {
48+
49+ ConsoleLogger& operator = (ConsoleLogger&& other) noexcept {
5050 if (this != &other) {
51- // Use std::lock to avoid deadlocks
52- std::lock (logMutex_, other.logMutex_ );
53- std::lock_guard<std::mutex> lock1 (logMutex_, std::adopt_lock);
54- std::lock_guard<std::mutex> lock2 (other.logMutex_ , std::adopt_lock);
55-
56- logFile_ = std::move (other.logFile_ );
57- addNewLine_ = other.addNewLine_ ;
58- currentLevel_ = other.currentLevel_ ;
51+ // Use std::lock to avoid deadlocks
52+ std::lock (logMutex_, other.logMutex_ );
53+ std::lock_guard<std::mutex> lock1 (logMutex_, std::adopt_lock);
54+ std::lock_guard<std::mutex> lock2 (other.logMutex_ , std::adopt_lock);
55+
56+ logFile_ = std::move (other.logFile_ );
57+ addNewLine_ = other.addNewLine_ ;
58+ currentLevel_ = other.currentLevel_ ;
5959 }
6060 return *this ;
61- }
61+ }
6262
6363 void debug (const std::string& message, const std::string& caller = " " ) override {
6464 log (dotnamecpp::logging::Level::LOG_DEBUG, message, caller);
0 commit comments