summaryrefslogtreecommitdiff
path: root/ndb/src/mgmsrv/CommandInterpreter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/src/mgmsrv/CommandInterpreter.cpp')
-rw-r--r--ndb/src/mgmsrv/CommandInterpreter.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/ndb/src/mgmsrv/CommandInterpreter.cpp b/ndb/src/mgmsrv/CommandInterpreter.cpp
index 316b6d5795e..2a054a01f1e 100644
--- a/ndb/src/mgmsrv/CommandInterpreter.cpp
+++ b/ndb/src/mgmsrv/CommandInterpreter.cpp
@@ -52,7 +52,7 @@ static const char* helpTexts[] = {
"{<id>|ALL} CLUSTERLOG {<category>=<level>}+ Set log level for cluster log",
"QUIT Quit management server",
};
-static const int noOfHelpTexts = sizeof(helpTexts)/sizeof(const char*);
+static const unsigned noOfHelpTexts = sizeof(helpTexts)/sizeof(const char*);
static const char* helpTextShow =
"SHOW prints NDB Cluster information\n\n"
@@ -389,14 +389,14 @@ void CommandInterpreter::executeHelp(char* parameters) {
<< endl;
ndbout << "<category> = ";
- for(i = 0; i<EventLogger::noOfEventCategoryNames; i++){
- ndbout << EventLogger::eventCategoryNames[i].name;
- if (i < EventLogger::noOfEventCategoryNames - 1) {
+ for(i = 0; i<CFG_MIN_LOGLEVEL; i++){
+ ndbout << ndb_mgm_get_event_category_string((ndb_mgm_event_category)i);
+ if (i < CFG_MIN_LOGLEVEL - 1) {
ndbout << " | ";
}
}
ndbout << endl;
-
+
ndbout << "<level> = " << "0 - 15"
<< endl;
@@ -647,6 +647,7 @@ versionCallback(int nodeId, int version, void * anyData, int errCode){
}
break;
case NDB_MGM_NODE_TYPE_UNKNOWN:
+ case NDB_MGM_NODE_TYPE_REP:
abort();
};
@@ -831,12 +832,13 @@ void CommandInterpreter::executeStatus(int processId,
//*****************************************************************************
void CommandInterpreter::executeLogLevel(int processId,
const char* parameters, bool all) {
+#if 0
(void)all; // Don't want compiler warning
SetLogLevelOrd logLevel; logLevel.clear();
if (emptyString(parameters) || (strcmp(parameters, "ALL") == 0)) {
- for(Uint32 i = 0; i<EventLogger::noOfEventCategoryNames; i++)
- logLevel.setLogLevel(EventLogger::eventCategoryNames[i].category, 7);
+ for(Uint32 i = 0; i<EventLoggerBase::noOfEventCategoryNames; i++)
+ logLevel.setLogLevel(EventLoggerBase::eventCategoryNames[i].category, 7);
} else {
char * tmpString = strdup(parameters);
@@ -852,7 +854,7 @@ void CommandInterpreter::executeLogLevel(int processId,
return;
}
LogLevel::EventCategory cat;
- if(!EventLogger::matchEventCategory(categoryTxt,
+ if(!EventLoggerBase::matchEventCategory(categoryTxt,
&cat)){
ndbout << "Invalid loglevel specification, unknown category: "
<< categoryTxt << endl;
@@ -875,6 +877,7 @@ void CommandInterpreter::executeLogLevel(int processId,
if (result != 0) {
ndbout << _mgmtSrvr.getErrorText(result) << endl;
}
+#endif
}
@@ -1080,12 +1083,13 @@ void CommandInterpreter::executeTestOff(int processId,
void CommandInterpreter::executeEventReporting(int processId,
const char* parameters,
bool all) {
+#if 0
(void)all; // Don't want compiler warning
SetLogLevelOrd logLevel; logLevel.clear();
if (emptyString(parameters) || (strcmp(parameters, "ALL") == 0)) {
- for(Uint32 i = 0; i<EventLogger::noOfEventCategoryNames; i++)
- logLevel.setLogLevel(EventLogger::eventCategoryNames[i].category, 7);
+ for(Uint32 i = 0; i<EventLoggerBase::noOfEventCategoryNames; i++)
+ logLevel.setLogLevel(EventLoggerBase::eventCategoryNames[i].category, 7);
} else {
char * tmpString = strdup(parameters);
@@ -1101,7 +1105,7 @@ void CommandInterpreter::executeEventReporting(int processId,
return;
}
LogLevel::EventCategory cat;
- if(!EventLogger::matchEventCategory(categoryTxt,
+ if(!EventLoggerBase::matchEventCategory(categoryTxt,
&cat)){
ndbout << "Invalid loglevel specification, unknown category: "
<< categoryTxt << endl;
@@ -1124,6 +1128,7 @@ void CommandInterpreter::executeEventReporting(int processId,
if (result != 0) {
ndbout << _mgmtSrvr.getErrorText(result) << endl;
}
+#endif
}
void