Public Member Functions | Private Attributes | Static Private Attributes | List of all members
icl_core::logging::SQLiteLogDb Class Reference

#include <SQLiteLogDb.h>

Public Member Functions

void closeDatabase ()
 
void openDatabase ()
 
 SQLiteLogDb (const icl_core::String &db_filename, bool rotate)
 
void writeLogLine (const char *app_id, const char *timestamp, const char *log_stream, const char *log_level, const char *filename, size_t line, const char *class_name, const char *object_name, const char *function_name, const char *message_text)
 
 ~SQLiteLogDb ()
 

Private Attributes

sqlite3 * m_db
 
icl_core::String m_db_filename
 
sqlite3_stmt * m_insert_stmt
 
int64_t m_last_rotation
 
bool m_rotate
 

Static Private Attributes

static icl_core::String m_create_sql
 
static icl_core::String m_insert_sql
 

Detailed Description

Definition at line 37 of file SQLiteLogDb.h.

Constructor & Destructor Documentation

icl_core::logging::SQLiteLogDb::SQLiteLogDb ( const icl_core::String db_filename,
bool  rotate 
)

Definition at line 40 of file SQLiteLogDb.cpp.

icl_core::logging::SQLiteLogDb::~SQLiteLogDb ( )

Definition at line 49 of file SQLiteLogDb.cpp.

Member Function Documentation

void icl_core::logging::SQLiteLogDb::closeDatabase ( )

Definition at line 127 of file SQLiteLogDb.cpp.

void icl_core::logging::SQLiteLogDb::openDatabase ( )

Definition at line 54 of file SQLiteLogDb.cpp.

void icl_core::logging::SQLiteLogDb::writeLogLine ( const char *  app_id,
const char *  timestamp,
const char *  log_stream,
const char *  log_level,
const char *  filename,
size_t  line,
const char *  class_name,
const char *  object_name,
const char *  function_name,
const char *  message_text 
)

Definition at line 142 of file SQLiteLogDb.cpp.

Member Data Documentation

icl_core::String icl_core::logging::SQLiteLogDb::m_create_sql
staticprivate
Initial value:
=
"CREATE TABLE log_entries (seq INTEGER PRIMARY KEY, app_id TEXT, "
"timestamp TIMESTAMP, log_stream TEXT, log_level TEXT, filename TEXT, "
"line INTEGER, class_name TEXT, object_name TEXT, function_name TEXT, message TEXT)"

Definition at line 58 of file SQLiteLogDb.h.

sqlite3* icl_core::logging::SQLiteLogDb::m_db
private

Definition at line 52 of file SQLiteLogDb.h.

icl_core::String icl_core::logging::SQLiteLogDb::m_db_filename
private

Definition at line 51 of file SQLiteLogDb.h.

icl_core::String icl_core::logging::SQLiteLogDb::m_insert_sql
staticprivate
Initial value:
=
"INSERT INTO log_entries (app_id, timestamp, log_stream, log_level, "
"filename, line, class_name, object_name, function_name, message) "
"VALUES (:app_id, :timestamp, :log_stream, :log_level, :filename, "
":line, :class_name, :object_name, :function_name, :message)"

Definition at line 59 of file SQLiteLogDb.h.

sqlite3_stmt* icl_core::logging::SQLiteLogDb::m_insert_stmt
private

Definition at line 53 of file SQLiteLogDb.h.

int64_t icl_core::logging::SQLiteLogDb::m_last_rotation
private

Definition at line 56 of file SQLiteLogDb.h.

bool icl_core::logging::SQLiteLogDb::m_rotate
private

Definition at line 55 of file SQLiteLogDb.h.


The documentation for this class was generated from the following files:


fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:59