Skip to content

Commit 83848cc

Browse files
committed
ndb
- remove unused EventLogger::open - move default values for FileLogHandler's constructor to the only place where they are now used
1 parent dd11e88 commit 83848cc

File tree

3 files changed

+3
-33
lines changed

3 files changed

+3
-33
lines changed

storage/ndb/include/debugger/EventLogger.hpp

-16
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#define EVENTLOGGER_H
2121

2222
#include <logger/Logger.hpp>
23-
#include <logger/FileLogHandler.hpp>
2423
#include <kernel/kernel_types.h>
2524
#include <kernel/LogLevel.hpp>
2625
#include <kernel/signaldata/EventReport.hpp>
@@ -107,21 +106,6 @@ class EventLogger : public EventLoggerBase, public Logger
107106
*/
108107
virtual ~EventLogger();
109108

110-
/**
111-
* Opens/creates the eventlog with the specified filename.
112-
*
113-
* @param aFileName the eventlog filename.
114-
* @param maxNoFiles the maximum no of archived eventlog files.
115-
* @param maxFileSize the maximum eventlog file size.
116-
* @param maxLogEntries the maximum number of log entries before
117-
* checking time to archive.
118-
* @return true if successful.
119-
*/
120-
bool open(const char* logFileName,
121-
int maxNoFiles = FileLogHandler::MAX_NO_FILES,
122-
long int maxFileSize = FileLogHandler::MAX_FILE_SIZE,
123-
unsigned int maxLogEntries = FileLogHandler::MAX_LOG_ENTRIES);
124-
125109
/**
126110
* Closes the eventlog.
127111
*/

storage/ndb/include/logger/FileLogHandler.hpp

+3-9
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ class File_class;
3838
class FileLogHandler : public LogHandler
3939
{
4040
public:
41-
/** Max number of log files to archive. */
42-
STATIC_CONST( MAX_NO_FILES = 6 );
43-
/** Max file size of the log before archiving. */
44-
STATIC_CONST( MAX_FILE_SIZE = 1024000 );
45-
/** Max number of log entries before archiving. */
46-
STATIC_CONST( MAX_LOG_ENTRIES = 10000 );
4741

4842
virtual const char* handler_type() {return "FILE"; };
4943

@@ -57,9 +51,9 @@ class FileLogHandler : public LogHandler
5751
* @param maxLogEntries the maximum number of log entries before checking time to archive.
5852
*/
5953
FileLogHandler(const char* aFileName = "logger.log",
60-
int maxNoFiles = MAX_NO_FILES,
61-
long maxFileSize = MAX_FILE_SIZE,
62-
unsigned int maxLogEntries = MAX_LOG_ENTRIES);
54+
int maxNoFiles = 6,
55+
long maxFileSize = 1024000,
56+
unsigned int maxLogEntries = 10000);
6357

6458
/**
6559
* Destructor.

storage/ndb/src/common/debugger/EventLogger.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -1187,14 +1187,6 @@ EventLogger::~EventLogger()
11871187
{
11881188
}
11891189

1190-
bool
1191-
EventLogger::open(const char* logFileName, int maxNoFiles, long maxFileSize,
1192-
unsigned int maxLogEntries)
1193-
{
1194-
return addHandler(new FileLogHandler(logFileName, maxNoFiles, maxFileSize,
1195-
maxLogEntries));
1196-
}
1197-
11981190
void
11991191
EventLogger::close()
12001192
{

0 commit comments

Comments
 (0)