MXS-2005: Remove unused code

Removed skygw_utils and relate files along with the old log manager
code. Also removed file flushing due to it being redundant; messages are
written to the file immediately. Adjusted tests to accommodate this
change.
This commit is contained in:
Markus Mäkelä
2018-08-11 11:11:04 +03:00
parent fd5a2305e4
commit 39ce6c624f
13 changed files with 104 additions and 4119 deletions

View File

@ -19,8 +19,8 @@
#include <stdlib.h>
#include <string.h>
#include <maxscale/alloc.h>
#include "../internal/skygw_utils.h"
#include <maxscale/log_manager.h>
#include <maxscale/debug.h>
static void skygw_log_enable(int priority)
{
@ -35,13 +35,8 @@ static void skygw_log_disable(int priority)
int main(int argc, char* argv[])
{
int err = 0;
const char* logstr;
int i;
const char* logstr;
bool succp;
skygw_message_t* mes;
simple_mutex_t* mtx;
size_t nactive;
time_t t;
struct tm tm;
char c;

View File

@ -109,7 +109,6 @@ bool run(const MXS_LOG_THROTTLING& throttling, int priority, size_t n_generate,
cout << "Logging " << n_generate << " messages with throttling as " << throttling << "," << endl;
mxs_log_set_throttling(&throttling); // Causes message to be logged.
mxs_log_flush_sync();
ifstream in(logfile.c_str());
in.seekg(0, ios_base::end);
@ -145,8 +144,6 @@ bool run(const MXS_LOG_THROTTLING& throttling, int priority, size_t n_generate,
ensure(rc == 0);
}
mxs_log_flush_sync();
for (size_t i = 0; i < N_THREADS; ++i)
{
void* rv;
@ -247,7 +244,7 @@ int main(int argc, char* argv[])
// 20 messages * N_THREADS, and since we are logging INFO messages, we should
// get 20 * N_THREADS messages.
if (!run(t, LOG_INFO, 20, 20 * N_THREADS + 1)) // There will be 1 info message about log flushing.
if (!run(t, LOG_INFO, 20, 20 * N_THREADS))
{
rc = EXIT_FAILURE;
}