Loading mysql-test/ndb/basic.result +4 −4 Original line number Diff line number Diff line Loading @@ -31,12 +31,12 @@ QUIT Quit management client <id> = ALL | Any database node id Connected to Management Server at: localhost:1186 Node 1: started (Version 4.1.8) Node 2: started (Version 4.1.8) Node 1: started (Version 4.1.9) Node 2: started (Version 4.1.9) Node 1: started (Version 4.1.8) Node 1: started (Version 4.1.9) Node 2: started (Version 4.1.8) Node 2: started (Version 4.1.9) Executing CLUSTERLOG on node 1 OK! Executing CLUSTERLOG on node 2 OK! Loading ndb/include/logger/LogHandler.hpp +21 −10 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ #include "Logger.hpp" /** * This class is the base class for all log handlers. A log handler is * responsible for formatting and writing log messages to a specific output. Loading Loading @@ -68,7 +67,8 @@ public: /** * Append a log message to the output stream/file whatever. * append() will call writeHeader(), writeMessage() and writeFooter() for * a child class and in that order. * a child class and in that order. Append checks for repeated messages. * append_impl() does not check for repeats. * * @param pCategory the category/name to tag the log entry with. * @param level the log level. Loading @@ -76,6 +76,8 @@ public: */ void append(const char* pCategory, Logger::LoggerLevel level, const char* pMsg); void append_impl(const char* pCategory, Logger::LoggerLevel level, const char* pMsg); /** * Returns a default formatted header. It currently has the Loading Loading @@ -111,14 +113,6 @@ public: */ void setDateTimeFormat(const char* pFormat); /** * Returns a string date and time string. * * @param pStr a string. * @return a string with date and time. */ char* getTimeAsString(char* pStr) const; /** * Returns the error code. */ Loading Loading @@ -185,6 +179,15 @@ protected: virtual void writeFooter() = 0; private: /** * Returns a string date and time string. * @note does not update time, uses m_now as time * @param pStr a string. * @return a string with date and time. */ char* getTimeAsString(char* pStr) const; time_t m_now; /** Prohibit */ LogHandler(const LogHandler&); LogHandler* operator = (const LogHandler&); Loading @@ -192,6 +195,14 @@ private: const char* m_pDateTimeFormat; int m_errorCode; // for handling repeated messages unsigned m_count_repeated_messages; unsigned m_max_repeat_frequency; time_t m_last_log_time; char m_last_category[MAX_HEADER_LENGTH]; char m_last_message[MAX_LOG_MESSAGE_SIZE]; Logger::LoggerLevel m_last_level; }; #endif ndb/include/logger/Logger.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ #include <ndb_global.h> #include <BaseString.hpp> #define MAX_LOG_MESSAGE_SIZE 1024 class LogHandler; class LogHandlerList; Loading ndb/include/ndbapi/ndb_cluster_connection.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ public: void set_optimized_node_selection(int val); int no_db_nodes(); unsigned no_db_nodes(); #endif private: Loading ndb/include/transporter/TransporterRegistry.hpp +6 −1 Original line number Diff line number Diff line Loading @@ -100,6 +100,11 @@ public: bool init(NodeId localNodeId); /** * after a connect from client, perform connection using correct transporter */ bool connect_server(NDB_SOCKET_TYPE sockfd); /** * Remove all transporters */ Loading Loading
mysql-test/ndb/basic.result +4 −4 Original line number Diff line number Diff line Loading @@ -31,12 +31,12 @@ QUIT Quit management client <id> = ALL | Any database node id Connected to Management Server at: localhost:1186 Node 1: started (Version 4.1.8) Node 2: started (Version 4.1.8) Node 1: started (Version 4.1.9) Node 2: started (Version 4.1.9) Node 1: started (Version 4.1.8) Node 1: started (Version 4.1.9) Node 2: started (Version 4.1.8) Node 2: started (Version 4.1.9) Executing CLUSTERLOG on node 1 OK! Executing CLUSTERLOG on node 2 OK! Loading
ndb/include/logger/LogHandler.hpp +21 −10 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ #include "Logger.hpp" /** * This class is the base class for all log handlers. A log handler is * responsible for formatting and writing log messages to a specific output. Loading Loading @@ -68,7 +67,8 @@ public: /** * Append a log message to the output stream/file whatever. * append() will call writeHeader(), writeMessage() and writeFooter() for * a child class and in that order. * a child class and in that order. Append checks for repeated messages. * append_impl() does not check for repeats. * * @param pCategory the category/name to tag the log entry with. * @param level the log level. Loading @@ -76,6 +76,8 @@ public: */ void append(const char* pCategory, Logger::LoggerLevel level, const char* pMsg); void append_impl(const char* pCategory, Logger::LoggerLevel level, const char* pMsg); /** * Returns a default formatted header. It currently has the Loading Loading @@ -111,14 +113,6 @@ public: */ void setDateTimeFormat(const char* pFormat); /** * Returns a string date and time string. * * @param pStr a string. * @return a string with date and time. */ char* getTimeAsString(char* pStr) const; /** * Returns the error code. */ Loading Loading @@ -185,6 +179,15 @@ protected: virtual void writeFooter() = 0; private: /** * Returns a string date and time string. * @note does not update time, uses m_now as time * @param pStr a string. * @return a string with date and time. */ char* getTimeAsString(char* pStr) const; time_t m_now; /** Prohibit */ LogHandler(const LogHandler&); LogHandler* operator = (const LogHandler&); Loading @@ -192,6 +195,14 @@ private: const char* m_pDateTimeFormat; int m_errorCode; // for handling repeated messages unsigned m_count_repeated_messages; unsigned m_max_repeat_frequency; time_t m_last_log_time; char m_last_category[MAX_HEADER_LENGTH]; char m_last_message[MAX_LOG_MESSAGE_SIZE]; Logger::LoggerLevel m_last_level; }; #endif
ndb/include/logger/Logger.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ #include <ndb_global.h> #include <BaseString.hpp> #define MAX_LOG_MESSAGE_SIZE 1024 class LogHandler; class LogHandlerList; Loading
ndb/include/ndbapi/ndb_cluster_connection.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ public: void set_optimized_node_selection(int val); int no_db_nodes(); unsigned no_db_nodes(); #endif private: Loading
ndb/include/transporter/TransporterRegistry.hpp +6 −1 Original line number Diff line number Diff line Loading @@ -100,6 +100,11 @@ public: bool init(NodeId localNodeId); /** * after a connect from client, perform connection using correct transporter */ bool connect_server(NDB_SOCKET_TYPE sockfd); /** * Remove all transporters */ Loading