diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2005-01-11 23:25:45 +0100 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2005-01-11 23:25:45 +0100 |
commit | a964b18269467ee0395c1f99249d7fe12347c870 (patch) | |
tree | 5a9b9589c6e696dd4e4fb98cd9dd465045ea9c64 /ndb/include | |
parent | 0f44ad64d08576415b170496aa9041eab203b912 (diff) | |
download | mariadb-git-a964b18269467ee0395c1f99249d7fe12347c870.tar.gz |
change to using public enum for log events
ndb/include/Makefile.am:
added ndb_logevent to source dist
Diffstat (limited to 'ndb/include')
-rw-r--r-- | ndb/include/Makefile.am | 3 | ||||
-rw-r--r-- | ndb/include/debugger/EventLogger.hpp | 2 | ||||
-rw-r--r-- | ndb/include/kernel/signaldata/EventReport.hpp | 88 |
3 files changed, 9 insertions, 84 deletions
diff --git a/ndb/include/Makefile.am b/ndb/include/Makefile.am index 1b298a09e26..56d9bbf01fb 100644 --- a/ndb/include/Makefile.am +++ b/ndb/include/Makefile.am @@ -31,7 +31,8 @@ mgmapiinclude_HEADERS = \ mgmapi/mgmapi.h \ mgmapi/mgmapi_debug.h \ mgmapi/mgmapi_config_parameters.h \ -mgmapi/mgmapi_config_parameters_debug.h +mgmapi/mgmapi_config_parameters_debug.h \ +mgmapi/ndb_logevent.h noinst_HEADERS = \ ndb_global.h \ diff --git a/ndb/include/debugger/EventLogger.hpp b/ndb/include/debugger/EventLogger.hpp index ddf21b79f5f..7c45dbd353d 100644 --- a/ndb/include/debugger/EventLogger.hpp +++ b/ndb/include/debugger/EventLogger.hpp @@ -40,7 +40,7 @@ public: * severity - DEBUG to ALERT (Type of log message) */ struct EventRepLogLevelMatrix { - EventReport::EventType eventType; + Ndb_logevent_type eventType; LogLevel::EventCategory eventCategory; Uint32 threshold; Logger::LoggerLevel severity; diff --git a/ndb/include/kernel/signaldata/EventReport.hpp b/ndb/include/kernel/signaldata/EventReport.hpp index 1ad6e1bf7ac..9822a0539cf 100644 --- a/ndb/include/kernel/signaldata/EventReport.hpp +++ b/ndb/include/kernel/signaldata/EventReport.hpp @@ -17,6 +17,7 @@ #ifndef SD_EVENT_REPORT_H #define SD_EVENT_REPORT_H +#include <ndb_logevent.h> #include "SignalData.hpp" /** @@ -67,98 +68,21 @@ public: 4) Add SentHeartbeat in EventLogger::getText() */ - enum EventType { - // CONNECTION - Connected = 0, - Disconnected = 1, - CommunicationClosed = 2, - CommunicationOpened = 3, - ConnectedApiVersion = 51, - // CHECKPOINT - GlobalCheckpointStarted = 4, - GlobalCheckpointCompleted = 5, - LocalCheckpointStarted = 6, - LocalCheckpointCompleted = 7, - LCPStoppedInCalcKeepGci = 8, - LCPFragmentCompleted = 9, - // STARTUP - NDBStartStarted = 10, - NDBStartCompleted = 11, - STTORRYRecieved = 12, - StartPhaseCompleted = 13, - CM_REGCONF = 14, - CM_REGREF = 15, - FIND_NEIGHBOURS = 16, - NDBStopStarted = 17, - NDBStopAborted = 18, - StartREDOLog = 19, - StartLog = 20, - UNDORecordsExecuted = 21, - - // NODERESTART - NR_CopyDict = 22, - NR_CopyDistr = 23, - NR_CopyFragsStarted = 24, - NR_CopyFragDone = 25, - NR_CopyFragsCompleted = 26, - - // NODEFAIL - NodeFailCompleted = 27, - NODE_FAILREP = 28, - ArbitState = 29, - ArbitResult = 30, - GCP_TakeoverStarted = 31, - GCP_TakeoverCompleted = 32, - LCP_TakeoverStarted = 33, - LCP_TakeoverCompleted = 34, - - // STATISTIC - TransReportCounters = 35, - OperationReportCounters = 36, - TableCreated = 37, - UndoLogBlocked = 38, - JobStatistic = 39, - SendBytesStatistic = 40, - ReceiveBytesStatistic = 41, - MemoryUsage = 50, - - // ERROR - TransporterError = 42, - TransporterWarning = 43, - MissedHeartbeat = 44, - DeadDueToHeartbeat = 45, - WarningEvent = 46, - // INFO - SentHeartbeat = 47, - CreateLogBytes = 48, - InfoEvent = 49, - - //GREP - GrepSubscriptionInfo = 52, - GrepSubscriptionAlert = 53, - - //BACKUP - BackupStarted = 54, - BackupFailedToStart = 55, - BackupCompleted = 56, - BackupAborted = 57 - }; - - void setEventType(EventType type); - EventType getEventType() const; + void setEventType(Ndb_logevent_type type); + Ndb_logevent_type getEventType() const; UintR eventType; // DATA 0 }; inline void -EventReport::setEventType(EventType type){ +EventReport::setEventType(Ndb_logevent_type type){ eventType = (UintR) type; } inline -EventReport::EventType +Ndb_logevent_type EventReport::getEventType() const { - return (EventType)eventType; + return (Ndb_logevent_type)eventType; } #endif |