MXS-2014 Use standard assert in Logger

This commit is contained in:
Johan Wikman 2018-08-16 13:27:02 +03:00
parent cfdfff46ae
commit 4388b8517e

View File

@ -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.");
}