Adding flush support for json log file. Closes #9.

This commit is contained in:
Guy Lichtman
2012-08-13 15:30:49 +03:00
parent 6dae35653a
commit e38bc05f0f
4 changed files with 111 additions and 70 deletions

9
include/audit_handler.h Normal file → Executable file
View File

@@ -213,8 +213,8 @@ public:
static const size_t MAX_AUDIT_HANDLERS_NUM = 4;
static const size_t BSON_FILE_HANDLER = 1;
static const size_t BSON_SOCKET_HANDLER = 3;
static const size_t JSON_FILE_HANDLER = 1;
static const size_t JSON_SOCKET_HANDLER = 3;
static Audit_handler * m_audit_handler_list[];
@@ -277,6 +277,11 @@ public:
}
void set_enable(bool val);
/**
* will close and start the handler
*/
void flush();
/**
* Will get relevant shared lock and call internal method of handler