1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-4483: Fix and consolidate log files and cpimport logging.

This commit is contained in:
benthompson15
2021-01-20 12:04:52 -06:00
parent ceae2118a2
commit afa88866bb
32 changed files with 172 additions and 287 deletions

View File

@ -23,12 +23,13 @@
#include <signal.h>
#include <sys/types.h>
#include <unistd.h>
#include "mcsconfig.h"
void fatalHandler(int sig)
{
char filename[128];
void* addrs[128];
snprintf(filename, 128, "/var/log/mariadb/columnstore/trace/%s.%d.log", program_invocation_short_name, getpid());
snprintf(filename, 128, "%s/trace/%s.%d.log", MCSLOGDIR, program_invocation_short_name, getpid());
FILE* logfile = fopen(filename, "w");
char s[30];
struct tm tim;

View File

@ -97,7 +97,7 @@ public:
outName = name;
ostringstream oss;
oss << "/var/log/mariadb/columnstore/trace/" << outName << '.' << sessionID;
oss << MCSLOGDIR << "/trace/" << outName << '.' << sessionID;
oFile.reset(new ofstream());
oFile->open(oss.str().c_str(), ios_base::out | ios_base::ate | ios_base::app);
}

View File

@ -33,6 +33,7 @@ using namespace logging;
#include <iomanip>
#include <sstream>
#include "boost/date_time/posix_time/posix_time_types.hpp"
#include "mcsconfig.h"
namespace threadpool
{
@ -523,7 +524,7 @@ void ThreadPool::dump()
void ThreadPoolMonitor::operator()()
{
ostringstream filename;
filename << "/var/log/mariadb/columnstore/trace/ThreadPool_" << fPool->name() << ".log";
filename << MCSLOGDIR << "/trace/ThreadPool_" << fPool->name() << ".log";
fLog = new ofstream(filename.str().c_str());
for (;;)