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 
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:
52  sqlite3 *m_db;
53  sqlite3_stmt *m_insert_stmt;
54 
55  bool m_rotate;
57 
60 };
61 
62 }
63 }
64 
65 #endif
static icl_core::String m_create_sql
Definition: SQLiteLogDb.h:58
static icl_core::String m_insert_sql
Definition: SQLiteLogDb.h:59
signed __int64 int64_t
Definition: msvc_stdint.h:102
icl_core::String m_db_filename
Definition: SQLiteLogDb.h:51
SQLiteLogDb(const icl_core::String &db_filename, bool rotate)
Definition: SQLiteLogDb.cpp:40
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)
std::string String
Definition: BaseTypes.h:43
Contains TimeStamp.


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