1 #ifndef sq3_LOG_DB_HPP_INCLUDED 2 #define sq3_LOG_DB_HPP_INCLUDED 1 44 explicit log_db( std::string
const & filename );
71 bool log( std::string
const & msg );
83 bool log(
char const * format, ... );
108 bool trim(
int leaveThisMany );
126 #endif // sq3_LOG_DB_HPP_INCLUDED Encapsulates a connection to an sqlite database.
virtual int clear()
Empties the log database.
log_db()
Creates an unopened database.
log_db is a simple logging database for use with arbitrary applications.
virtual ~log_db()
Closes this db.
bool log(std::string const &msg)
Logs a message to the log database.
virtual int on_open()
Called when open() succeeds.
virtual void show_last(int howMany)
Shows the last count entries using a subclass-specific method.
The sq3 namespace encapsulates an OO sqlite3 API very similar to the sqlite3x API,...
bool trim(int leaveThisMany)
Deletes all entries in the log except the leaveThisMany most recent.