You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
proxysql/include/MySQL_Logger.hpp

29 lines
547 B

#ifndef __CLASS_MYSQL_LOGGER_H
#define __CLASS_MYSQL_LOGGER_H
#include "proxysql.h"
#include "cpp.h"
class MySQL_Logger {
private:
char *base_filename;
char *datadir;
unsigned int log_file_id;
unsigned int max_log_file_size;
rwlock_t rwlock;
void wrlock();
void wrunlock();
std::fstream *logfile;
public:
MySQL_Logger();
~MySQL_Logger();
void flush_log();
void flush_log_unlocked();
unsigned int find_next_id();
void set_datadir(char *);
void log_request(MySQL_Session *);
void flush();
};
#endif /* __CLASS_MYSQL_LOGGER_H */