MXS-2014 Use standard assert in Logger
This commit is contained in:
parent
cfdfff46ae
commit
4388b8517e
@ -17,6 +17,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
@ -24,9 +25,6 @@
|
||||
|
||||
#include <maxbase/string.h>
|
||||
|
||||
// TODO: move <maxscale/debug.h> into maxbase
|
||||
#define ss_dassert(a)
|
||||
|
||||
/**
|
||||
* Error logging for the logger itself.
|
||||
*
|
||||
@ -103,7 +101,8 @@ std::unique_ptr<Logger> FileLogger::create(const std::string& filename)
|
||||
FileLogger::~FileLogger()
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(m_lock);
|
||||
ss_dassert(m_fd != -1);
|
||||
// As mxb_assert() logs to the log-file, it cannot be used here.
|
||||
assert(m_fd != -1);
|
||||
close("MariaDB MaxScale is shut down.");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user