Added ability to override default logging implementation with
-DUSE_LOGGER
This commit is contained in:
parent
19ad308e10
commit
44aef7e8ea
3 changed files with 21 additions and 2 deletions
|
@ -94,6 +94,10 @@ terms specified in this license.
|
|||
#define BUFFER_MANAGER_REOPEN 0
|
||||
#define BUFFER_MANAGER_HASH 1
|
||||
#define BUFFER_MANAGER_MEM_ARRAY 2
|
||||
|
||||
#define LOG_TO_FILE 0
|
||||
#define LOG_TO_MEMORY 1
|
||||
|
||||
#define MAX_TRANSACTIONS 1000
|
||||
|
||||
/** Operation types */
|
||||
|
|
|
@ -83,9 +83,20 @@ typedef struct {
|
|||
lsn_t recLSN;
|
||||
} TransactionLog;
|
||||
|
||||
#define LOG_TO_FILE 0
|
||||
#define LOG_TO_MEMORY 1
|
||||
/**
|
||||
This is the log implementation that is being used.
|
||||
Before Stasis is intialized, it will be set to a default value.
|
||||
|
||||
It may be changed before Tinit() is called by assigning to it.
|
||||
|
||||
The default can be overriddent at compile time by defining
|
||||
USE_LOGGER
|
||||
|
||||
(eg: gcc ... -DUSE_LOGGER=LOG_TO_FOO)
|
||||
|
||||
@see constants.h for a list of recognized log implementations.
|
||||
|
||||
*/
|
||||
extern int loggerType;
|
||||
|
||||
int LogInit(int logType);
|
||||
|
|
|
@ -59,7 +59,11 @@ terms specified in this license.
|
|||
|
||||
#include "page.h"
|
||||
|
||||
#ifdef USE_LOGGER
|
||||
int loggerType = USE_LOGGER;
|
||||
#else
|
||||
int loggerType = LOG_TO_FILE;
|
||||
#endif
|
||||
|
||||
extern int numActiveXactions;
|
||||
static int pendingCommits;
|
||||
|
|
Loading…
Reference in a new issue