mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-17 19:16:14 +02:00
Update aixlog to v1.2.5
This commit is contained in:
parent
cd9f785425
commit
52af69618c
2 changed files with 9 additions and 3 deletions
|
@ -3,11 +3,11 @@
|
||||||
/ _\ ( )( \/ )( ) / \ / __)
|
/ _\ ( )( \/ )( ) / \ / __)
|
||||||
/ \ )( ) ( / (_/\( O )( (_ \
|
/ \ )( ) ( / (_/\( O )( (_ \
|
||||||
\_/\_/(__)(_/\_)\____/ \__/ \___/
|
\_/\_/(__)(_/\_)\____/ \__/ \___/
|
||||||
version 1.2.4
|
version 1.2.5
|
||||||
https://github.com/badaix/aixlog
|
https://github.com/badaix/aixlog
|
||||||
|
|
||||||
This file is part of aixlog
|
This file is part of aixlog
|
||||||
Copyright (C) 2017-2019 Johannes Pohl
|
Copyright (C) 2017-2020 Johannes Pohl
|
||||||
|
|
||||||
This software may be modified and distributed under the terms
|
This software may be modified and distributed under the terms
|
||||||
of the MIT license. See the LICENSE file for details.
|
of the MIT license. See the LICENSE file for details.
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// Internal helper macros (exposed, but shouldn't be used directly)
|
/// Internal helper macros (exposed, but shouldn't be used directly)
|
||||||
#define AIXLOG_INTERNAL__LOG_SEVERITY(SEVERITY_) std::clog << static_cast<AixLog::Severity>(SEVERITY_)
|
#define AIXLOG_INTERNAL__LOG_SEVERITY(SEVERITY_) std::clog << static_cast<AixLog::Severity>(SEVERITY_) << TAG()
|
||||||
#define AIXLOG_INTERNAL__LOG_SEVERITY_TAG(SEVERITY_, TAG_) std::clog << static_cast<AixLog::Severity>(SEVERITY_) << TAG(TAG_)
|
#define AIXLOG_INTERNAL__LOG_SEVERITY_TAG(SEVERITY_, TAG_) std::clog << static_cast<AixLog::Severity>(SEVERITY_) << TAG(TAG_)
|
||||||
|
|
||||||
#define AIXLOG_INTERNAL__ONE_COLOR(FG_) AixLog::Color::FG_
|
#define AIXLOG_INTERNAL__ONE_COLOR(FG_) AixLog::Color::FG_
|
||||||
|
|
|
@ -17,9 +17,13 @@
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#include "watchdog.hpp"
|
#include "watchdog.hpp"
|
||||||
|
#include "common/aixlog.hpp"
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
|
|
||||||
|
static constexpr auto LOG_TAG = "Watchdog";
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace streamreader
|
namespace streamreader
|
||||||
|
@ -38,6 +42,7 @@ Watchdog::~Watchdog()
|
||||||
|
|
||||||
void Watchdog::start(const std::chrono::milliseconds& timeout)
|
void Watchdog::start(const std::chrono::milliseconds& timeout)
|
||||||
{
|
{
|
||||||
|
LOG(INFO, LOG_TAG) << "Starting watchdog, timeout: " << std::chrono::duration_cast<std::chrono::seconds>(timeout).count() << "s\n";
|
||||||
timeout_ms_ = timeout;
|
timeout_ms_ = timeout;
|
||||||
trigger();
|
trigger();
|
||||||
}
|
}
|
||||||
|
@ -56,6 +61,7 @@ void Watchdog::trigger()
|
||||||
timer_.async_wait([this](const boost::system::error_code& ec) {
|
timer_.async_wait([this](const boost::system::error_code& ec) {
|
||||||
if (!ec)
|
if (!ec)
|
||||||
{
|
{
|
||||||
|
LOG(INFO, LOG_TAG) << "Timed out: " << std::chrono::duration_cast<std::chrono::seconds>(timeout_ms_).count() << "s\n";
|
||||||
listener_->onTimeout(*this, timeout_ms_);
|
listener_->onTimeout(*this, timeout_ms_);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue