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-370
This commit is contained in:
@ -4,4 +4,3 @@ local1.=err -/var/log/mariadb/columnstore/err.log
|
|||||||
local1.=warning -/var/log/mariadb/columnstore/warning.log
|
local1.=warning -/var/log/mariadb/columnstore/warning.log
|
||||||
local1.=info -/var/log/mariadb/columnstore/info.log
|
local1.=info -/var/log/mariadb/columnstore/info.log
|
||||||
local1.=debug -/var/log/mariadb/columnstore/debug.log
|
local1.=debug -/var/log/mariadb/columnstore/debug.log
|
||||||
local2.=crit -/var/log/mariadb/columnstore/data/data_mods.log
|
|
||||||
|
@ -18,7 +18,6 @@ filter f_local1err { facility(local1) and level(err); };
|
|||||||
filter f_local1warning { facility(local1) and level(warning); };
|
filter f_local1warning { facility(local1) and level(warning); };
|
||||||
filter f_local1info { facility(local1) and level(info); };
|
filter f_local1info { facility(local1) and level(info); };
|
||||||
filter f_local1debug { facility(local1) and level(debug); };
|
filter f_local1debug { facility(local1) and level(debug); };
|
||||||
filter f_local2crit { facility(local2) and level(crit); };
|
|
||||||
|
|
||||||
destination d_crit{
|
destination d_crit{
|
||||||
file("/var/log/mariadb/columnstore/crit.log");
|
file("/var/log/mariadb/columnstore/crit.log");
|
||||||
@ -40,10 +39,6 @@ destination d_debug{
|
|||||||
file("/var/log/mariadb/columnstore/debug.log");
|
file("/var/log/mariadb/columnstore/debug.log");
|
||||||
};
|
};
|
||||||
|
|
||||||
destination d_data_mods{
|
|
||||||
file("/var/log/mariadb/columnstore/data/data_mods.log");
|
|
||||||
};
|
|
||||||
|
|
||||||
log{
|
log{
|
||||||
source(s_columnstore);
|
source(s_columnstore);
|
||||||
filter(f_local1crit);
|
filter(f_local1crit);
|
||||||
@ -70,9 +65,3 @@ log{
|
|||||||
filter(f_local1debug);
|
filter(f_local1debug);
|
||||||
destination(d_debug);
|
destination(d_debug);
|
||||||
};
|
};
|
||||||
log{
|
|
||||||
source(s_columnstore);
|
|
||||||
filter(f_local2crit);
|
|
||||||
destination(d_data_mods);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
@ -4,5 +4,4 @@ local1.err -/var/log/mariadb/columnstore/err.log
|
|||||||
local1.warning -/var/log/mariadb/columnstore/warning.log
|
local1.warning -/var/log/mariadb/columnstore/warning.log
|
||||||
local1.info -/var/log/mariadb/columnstore/info.log
|
local1.info -/var/log/mariadb/columnstore/info.log
|
||||||
local1.debug -/var/log/mariadb/columnstore/debug.log
|
local1.debug -/var/log/mariadb/columnstore/debug.log
|
||||||
local2.crit -/var/log/mariadb/columnstore/data/data_mods.log
|
|
||||||
|
|
||||||
|
0
oam/install_scripts/syslogSetup.sh
Normal file → Executable file
0
oam/install_scripts/syslogSetup.sh
Normal file → Executable file
@ -368,6 +368,16 @@ namespace oam
|
|||||||
""
|
""
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const std::string LogFile7[] =
|
||||||
|
{
|
||||||
|
"local1.crit -/var/log/mariadb/columnstore/crit.log",
|
||||||
|
"local1.err -/var/log/mariadb/columnstore/err.log",
|
||||||
|
"local1.warning -/var/log/mariadb/columnstore/warning.log",
|
||||||
|
"local1.info -/var/log/mariadb/columnstore/info.log",
|
||||||
|
"local1.debug -/var/log/mariadb/columnstore/debug.log",
|
||||||
|
""
|
||||||
|
};
|
||||||
|
|
||||||
/** @brief Log Config Data map
|
/** @brief Log Config Data map
|
||||||
*/
|
*/
|
||||||
typedef struct LogConfigData_struct
|
typedef struct LogConfigData_struct
|
||||||
|
@ -2851,6 +2851,11 @@ int ProcessMonitor::updateLog(std::string action, std::string level)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool syslog7 = false;
|
||||||
|
pos = fileName.find("49",0);
|
||||||
|
if (pos != string::npos) {
|
||||||
|
syslog7 = true;
|
||||||
|
}
|
||||||
vector <string> lines;
|
vector <string> lines;
|
||||||
|
|
||||||
if ( level == "data" )
|
if ( level == "data" )
|
||||||
@ -2883,16 +2888,15 @@ int ProcessMonitor::updateLog(std::string action, std::string level)
|
|||||||
|
|
||||||
for( int i = 0;;i++)
|
for( int i = 0;;i++)
|
||||||
{
|
{
|
||||||
string::size_type pos = oam::LogFile[i].find("local2",0);
|
string localLogFile = oam::LogFile[i];
|
||||||
if (pos != string::npos)
|
if (syslog7)
|
||||||
//skip
|
localLogFile = oam::LogFile7[i];
|
||||||
continue;
|
|
||||||
|
|
||||||
if ( oam::LogFile[i] == "" ) {
|
if ( localLogFile == "" ) {
|
||||||
// end of list
|
// end of list
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
string logFile = oam::LogFile[i];
|
string logFile = localLogFile;
|
||||||
|
|
||||||
pos = buf.find(logFile,0);
|
pos = buf.find(logFile,0);
|
||||||
if (pos != string::npos) {
|
if (pos != string::npos) {
|
||||||
@ -2910,7 +2914,10 @@ int ProcessMonitor::updateLog(std::string action, std::string level)
|
|||||||
for( int i = 0;;i++)
|
for( int i = 0;;i++)
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
if ( oam::LogFile[i] == "" ) {
|
string localLogFile = oam::LogFile[i];
|
||||||
|
if (syslog7)
|
||||||
|
localLogFile = oam::LogFile7[i];
|
||||||
|
if ( localLogFile == "" ) {
|
||||||
// end of list
|
// end of list
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2926,8 +2933,8 @@ int ProcessMonitor::updateLog(std::string action, std::string level)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
lines.push_back(oam::LogFile[i]);
|
lines.push_back(localLogFile);
|
||||||
log.writeLog(__LINE__, "Add in syslog.conf log file " + oam::LogFile[i], LOG_TYPE_DEBUG);
|
log.writeLog(__LINE__, "Add in syslog.conf log file " + localLogFile, LOG_TYPE_DEBUG);
|
||||||
update = true;
|
update = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2950,7 +2957,10 @@ int ProcessMonitor::updateLog(std::string action, std::string level)
|
|||||||
}
|
}
|
||||||
if ( level == oam::LogLevel[i] ) {
|
if ( level == oam::LogLevel[i] ) {
|
||||||
// match found
|
// match found
|
||||||
string logFile = oam::LogFile[i];
|
string localLogFile = oam::LogFile[i];
|
||||||
|
if (syslog7)
|
||||||
|
localLogFile = oam::LogFile7[i];
|
||||||
|
string logFile = localLogFile;
|
||||||
|
|
||||||
while (oldFile.getline(line, 200))
|
while (oldFile.getline(line, 200))
|
||||||
{
|
{
|
||||||
@ -2982,16 +2992,14 @@ int ProcessMonitor::updateLog(std::string action, std::string level)
|
|||||||
bool found = false;
|
bool found = false;
|
||||||
for( int i = 0;;i++)
|
for( int i = 0;;i++)
|
||||||
{
|
{
|
||||||
string::size_type pos = oam::LogFile[i].find("local2",0);
|
string localLogFile = oam::LogFile[i];
|
||||||
if (pos != string::npos)
|
if (syslog7)
|
||||||
//skip
|
localLogFile = oam::LogFile7[i];
|
||||||
continue;
|
if ( localLogFile == "" ) {
|
||||||
|
|
||||||
if ( oam::LogFile[i] == "" ) {
|
|
||||||
// end of list
|
// end of list
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
string logFile = oam::LogFile[i];
|
string logFile = localLogFile;
|
||||||
|
|
||||||
pos = buf.find(logFile,0);
|
pos = buf.find(logFile,0);
|
||||||
if (pos != string::npos) {
|
if (pos != string::npos) {
|
||||||
@ -3024,7 +3032,10 @@ int ProcessMonitor::updateLog(std::string action, std::string level)
|
|||||||
}
|
}
|
||||||
if ( level == oam::LogLevel[i] ) {
|
if ( level == oam::LogLevel[i] ) {
|
||||||
// match found
|
// match found
|
||||||
string logFile = oam::LogFile[i];
|
string localLogFile = oam::LogFile[i];
|
||||||
|
if (syslog7)
|
||||||
|
localLogFile = oam::LogFile7[i];
|
||||||
|
string logFile = localLogFile;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
while (oldFile.getline(line, 200))
|
while (oldFile.getline(line, 200))
|
||||||
{
|
{
|
||||||
@ -3086,7 +3097,7 @@ int ProcessMonitor::updateLog(std::string action, std::string level)
|
|||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
oam.syslogAction("sighup");
|
oam.syslogAction("restart");
|
||||||
}
|
}
|
||||||
|
|
||||||
//update file priviledges
|
//update file priviledges
|
||||||
|
Reference in New Issue
Block a user