You've already forked mariadb-columnstore-engine
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:
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 (;;)
|
||||
|
Reference in New Issue
Block a user