#include <Logging.hpp>
Static Public Member Functions | |
static clock_t | clock () |
static void | debug (const std::string &message) |
static void | debug (const std::string &key, unsigned value) |
static void | debug (const std::string &key, const std::string &value) |
static void | error (const std::string &message) |
static void | log (const std::string &message) |
static time_t | time () |
static std::string | timestamp () |
Private Member Functions | |
Logging () | |
~Logging () |
A helper class for time measures and debug output.
Created on Jun 22, 2008
Definition at line 22 of file Logging.hpp.
aitools::invertedindex::Logging::Logging | ( | ) | [private] |
The constructor.
aitools::invertedindex::Logging::~Logging | ( | ) | [private] |
The destructor.
clock_t aitools::invertedindex::Logging::clock | ( | ) | [static] |
Returns the number of cpu clocks the program used.
Definition at line 5 of file Logging.cpp.
Referenced by debug().
void aitools::invertedindex::Logging::debug | ( | const std::string & | key, | |
const std::string & | value | |||
) | [static] |
Definition at line 24 of file Logging.cpp.
References timestamp().
void aitools::invertedindex::Logging::debug | ( | const std::string & | key, | |
unsigned | value | |||
) | [static] |
Definition at line 17 of file Logging.cpp.
void aitools::invertedindex::Logging::debug | ( | const std::string & | message | ) | [static] |
Prints out a message to stdout if WEBIS_DEBUG is defined.
message | the message to print out. |
Definition at line 11 of file Logging.cpp.
References clock().
void aitools::invertedindex::Logging::error | ( | const std::string & | message | ) | [static] |
Prints out a message to stderr.
message | the message to print out. |
Definition at line 31 of file Logging.cpp.
References timestamp().
Referenced by aitools::invertedindex::build_ngram_index().
void aitools::invertedindex::Logging::log | ( | const std::string & | message | ) | [static] |
Prints out a message to stdout.
message | the message to print out. |
Definition at line 37 of file Logging.cpp.
Referenced by aitools::invertedindex::StorageBuilder::put().
time_t aitools::invertedindex::Logging::time | ( | ) | [static] |
Returns the seconds since January 1, 1970. This function can be used for runtime meassures. For cpu time messures use Logging::clock() instead.
Definition at line 43 of file Logging.cpp.
std::string aitools::invertedindex::Logging::timestamp | ( | ) | [static] |
A method to get the present timestamp in string representation.
Definition at line 49 of file Logging.cpp.
Referenced by debug(), and error().