![]() |
TkN 2.1
Toolkit for Nuclei
|
Classe used to print debugs, infos, warnings and errors into the terminal. More...
Classe used to print debugs, infos, warnings and errors into the terminal.
#include <tklog.h>
Public Types | |
enum | bColor { kBlack = 0 , kRed = 1 , kGreen = 2 , kYellow = 3 , kBlue = 4 , kPurple = 5 , kCyan = 6 , kWhite = 7 , kDefault_color = 8 } |
enum | bType { kRegular = 0 , kBold = 1 , kItalic = 3 , kUnderline = 4 , kBlink = 5 } |
enum | log_level { kinfo , kwarning , kerror , knone } |
Public Member Functions | |
tklog () | |
virtual | ~tklog () |
void | clear () |
tklog & | operator<< (std::basic_ostream< char > o) |
template<class T > | |
tklog & | operator<< (T t) |
send any request to the underlying ostringstream More... | |
virtual tklog & | operator<< (tklog &(*pf)(tklog &)) |
To allow manipulators. More... | |
void | progress_bar (int _max, int _value, const tkstring &_message="") |
void | set_class (tkstring _class_name) |
void | set_log_level (log_level _level) |
void | set_method (tkstring _method_name) |
void | set_warnings (bool _print_warnings=true) |
Static Public Member Functions | |
static tklog * | the_log () |
glog is a singleton used for fancy prints in the terminal More... | |
Public Attributes | |
bColor | fBG_color = kDefault_color |
tkstring | fClass {} |
To put back the standard font in std::cout. More... | |
std::ostringstream | fCore_message {} |
Contains the type string to be printed with the current style. More... | |
bColor | fFG_color = kDefault_color |
std::ostringstream | fHeader {} |
Contains the core message string to be printed with the current style. More... | |
bool | fHigh_intensity_colors = false |
log_level | flog_level = kinfo |
tkstring | fMethod {} |
bool | fprint_warnings = true |
std::ostringstream | fType_message {} |
tkstring | fTypes = "" |
Static Public Attributes | |
static const tkstring | freset_font = "\e[0m" |
Contains the style (color + type) More... | |
enum bColor |
enum bType |
|
inline |
void progress_bar | ( | int | _max, |
int | _value, | ||
const tkstring & | _message = "" |
||
) |
|
static |
bColor fBG_color = kDefault_color |
tkstring fClass {} |
std::ostringstream fCore_message {} |
bColor fFG_color = kDefault_color |
std::ostringstream fHeader {} |
|
static |