18 #include <boost/format.hpp>
19 #include <boost/date_time/posix_time/posix_time.hpp>
51 typedef std::pair<std::string, std::string>
logitem;
52 typedef std::vector<logitem>
log;
56 static std::string
endl(){
return "EOL";}
85 #pragma omp critical (logger)
96 std::cout <<
m_ss.str() << std::endl;
bool m_abort
Definition: logger.h:126
static std::string timestamp()
timestamp returns a string giving the current time, eg: "2013-Jan-01 12:12:12"
Definition: logger.cpp:198
void save_logs(std::string filename)
save_logs outputs the Loggers current log list to a file
Definition: logger.cpp:168
void set_print_output(bool in)
Toggle the console output of the Logger on or off.
Definition: logger.cpp:70
bool m_print
Definition: logger.h:124
void check_abort()
check_abort checks the status of the abort boolean. If it is set to false it does nothing...
Definition: logger.cpp:93
int m_percentage
Definition: logger.h:122
std::vector< logitem > log
Definition: logger.h:52
std::stringstream m_ss
Definition: logger.h:116
static std::string endl()
Definition: logger.h:56
logger()
Definition: logger.cpp:21
virtual ~logger()
Definition: logger.cpp:36
std::pair< std::string, std::string > logitem
Definition: logger.h:51
void set_abort(bool in)
set_abort sets the abort boolean. If set to true, the next time a processing function calls check_abo...
Definition: logger.cpp:109
scyl::logger::log take_logs()
take_logs returns the log vector, and clears the Logger's logs..
Definition: logger.cpp:155
static logger * access()
Logger access function is used to access the logger object.
Definition: logger.cpp:55
static logger * m_instance
Definition: logger.h:114
scyl::logger & operator<<(T const &in)
Pipe operator for the logger. Used to add logs.
Definition: logger.h:83
void set_stage(scyl::PIPELINE_STAGE in)
Set the pipeline stage.
Definition: logger.cpp:274
void add_log(const std::string ×tamp, const std::string &in)
add_log adds a log to the list of logs
Definition: logger.cpp:132
scyl::PIPELINE_STAGE m_stage
Definition: logger.h:118
scyl::logger::log get_logs()
get_logs returns the log vector
Definition: logger.cpp:144
scyl::logger::log m_log
Definition: logger.h:120
bool abort() const
Definition: logger.cpp:118
PIPELINE_STAGE
Definition: scyllarus_types.h:46
Logger is used to record messages and other processing details for the scyl library functions and acc...
Definition: logger.h:46
void set_percentage(int in)
Set the percentage.
Definition: logger.cpp:227
void set_bar(bool in)
Toggle the progress bar in the console on and off (may want to disable if you need higher levels of d...
Definition: logger.cpp:81
scyl::PIPELINE_STAGE stage()
stage returns the currently set pipeline stage.
Definition: logger.cpp:263
int percentage()
percentage returns the currently set percentage
Definition: logger.cpp:216
bool m_bar
Definition: logger.h:128