28thread_local tklog *tklog::g_log =
nullptr;
34 if ( g_log ==
nullptr ) {
43 if(_value>_max)
return;
49 std::cout <<
"\e[94;108;1m" <<
"[";
50 int pos = (int) (barWidth * (1.*_value/_max));
51 for (
int i = 0; i < barWidth; ++i) {
52 if (i < pos) std::cout <<
"=";
53 else if (i == pos) std::cout <<
"=";
54 else std::cout <<
" ";
56 std::cout <<
"] " <<
freset_font << _message <<
" \r";
59 if(_value==_max) std::cout << std::endl;
64void tklog::set_type(bType _type)
78void tklog::process_color()
82 tkstring fg_color, bg_color;
Classe used to print debugs, infos, warnings and errors into the terminal.
void progress_bar(int _max, int _value, const tkstring &_message="")
friend tklog & reset(tklog &)
To print the current message, then reset the log.
bool fHigh_intensity_colors
static tklog * the_log()
glog is a singleton used for fancy prints in the terminal
static const tkstring freset_font
Contains the style (color + type)
std::ostringstream fHeader
Contains the core message string to be printed with the current style.
std::string with usefull tricks from TString (ROOT) and KVString (KaliVeda) and more....
static tkstring Form(const char *_format,...)
tkstring & append(const tkstring &_st)