62 std::fstream log_file;
119 CLog(
const std::string& filename);
210 this->access.
enter();
212 this->time_stamp.
set();
214 this->log_file <<
"[" << this->time_stamp.
getString() <<
"] - " << value << std::endl;
238 this->access.
enter();
239 this->time_stamp.
set();
242 this->log_file <<
"[" << this->time_stamp.
getString() <<
"] - ";
243 for(i=0;i<values.size();i++)
245 this->log_file << values[i];
246 if(i<values.size()-1)
247 this->log_file <<
",";
249 this->log_file << std::endl;
void log(const T &value)
Function to write a variable to the log.
std::string get_filename(void)
Function to get the full filename.
ctimeformat get_time_format()
Function to get the time format.
Implementation of a mutual exclusion mechanism.
void enable(void)
Function to enable the log This function enable the particular log associated with the object...
Implementation of a log file.
void log_vector(const std::vector< T > &values)
Function to write a vector of variable to the log.
std::string getString(void)
Gives a formatted string of this time.
void set_time_format(ctimeformat format)
Function to set the time format.
Implementation of a time class and operations.
void disable(void)
Function to disable the log This function disables the particular log associated with the object...
void exit(void)
function to release the critical section
void enter(void)
function to request access to the critical section
CLog(const std::string &filename)
Constructor.
void set(double milliseconds=-1.0)
Sets the internal time.
bool is_enabled(void)
Function to check if the log is enabled.