Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
icl_core
src
icl_core_logging
SQLiteLogDb.h
Go to the documentation of this file.
1
// this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2
3
// -- BEGIN LICENSE BLOCK ----------------------------------------------
4
// This file is part of FZIs ic_workspace.
5
//
6
// This program is free software licensed under the LGPL
7
// (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
8
// You can find a copy of this license in LICENSE folder in the top
9
// directory of the source code.
10
//
11
// © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
12
//
13
// -- END LICENSE BLOCK ------------------------------------------------
14
15
//----------------------------------------------------------------------
26
//----------------------------------------------------------------------
27
#ifndef ICL_CORE_LOGGING_SQLITE_LOG_DB_H_INCLUDED
28
#define ICL_CORE_LOGGING_SQLITE_LOG_DB_H_INCLUDED
29
30
#include <sqlite3.h>
31
32
#include <
icl_core/TimeStamp.h
>
33
34
namespace
icl_core
{
35
namespace
logging {
36
37
class
SQLiteLogDb
38
{
39
public
:
40
SQLiteLogDb
(
const
icl_core::String
& db_filename,
bool
rotate);
41
~SQLiteLogDb
();
42
43
void
openDatabase
();
44
void
closeDatabase
();
45
void
writeLogLine
(
const
char
*app_id,
const
char
*timestamp,
46
const
char
*log_stream,
const
char
*log_level,
const
char
*filename,
47
size_t
line,
const
char
*class_name,
const
char
*object_name,
48
const
char
*function_name,
const
char
*message_text);
49
50
private
:
51
icl_core::String
m_db_filename
;
52
sqlite3 *
m_db
;
53
sqlite3_stmt *
m_insert_stmt
;
54
55
bool
m_rotate
;
56
int64_t
m_last_rotation
;
57
58
static
icl_core::String
m_create_sql
;
59
static
icl_core::String
m_insert_sql
;
60
};
61
62
}
63
}
64
65
#endif
icl_core::logging::SQLiteLogDb::m_create_sql
static icl_core::String m_create_sql
Definition:
SQLiteLogDb.h:58
icl_core::logging::SQLiteLogDb::m_insert_sql
static icl_core::String m_insert_sql
Definition:
SQLiteLogDb.h:59
icl_core::logging::SQLiteLogDb::m_db
sqlite3 * m_db
Definition:
SQLiteLogDb.h:52
icl_core::logging::SQLiteLogDb::m_insert_stmt
sqlite3_stmt * m_insert_stmt
Definition:
SQLiteLogDb.h:53
icl_core::logging::SQLiteLogDb::m_rotate
bool m_rotate
Definition:
SQLiteLogDb.h:55
icl_core::logging::SQLiteLogDb::closeDatabase
void closeDatabase()
Definition:
SQLiteLogDb.cpp:127
int64_t
signed __int64 int64_t
Definition:
msvc_stdint.h:102
icl_core::logging::SQLiteLogDb::m_db_filename
icl_core::String m_db_filename
Definition:
SQLiteLogDb.h:51
icl_core::logging::SQLiteLogDb::openDatabase
void openDatabase()
Definition:
SQLiteLogDb.cpp:54
icl_core::logging::SQLiteLogDb::SQLiteLogDb
SQLiteLogDb(const icl_core::String &db_filename, bool rotate)
Definition:
SQLiteLogDb.cpp:40
icl_core::logging::SQLiteLogDb::writeLogLine
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)
Definition:
SQLiteLogDb.cpp:142
icl_core::logging::SQLiteLogDb::m_last_rotation
int64_t m_last_rotation
Definition:
SQLiteLogDb.h:56
icl_core::String
std::string String
Definition:
BaseTypes.h:43
icl_core::logging::SQLiteLogDb
Definition:
SQLiteLogDb.h:37
TimeStamp.h
Contains TimeStamp.
icl_core
Definition:
Array2D.h:30
icl_core::logging::SQLiteLogDb::~SQLiteLogDb
~SQLiteLogDb()
Definition:
SQLiteLogDb.cpp:49
fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:58