![]() |
TkN 2.3
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 | |
| virtual tklog & | operator<< (tklog &(*pf)(tklog &)) |
| To allow manipulators. | |
| 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 | |
Public Attributes | |
| bColor | fBG_color = kDefault_color |
| tkstring | fClass {} |
| To put back the standard font in std::cout. | |
| std::ostringstream | fCore_message {} |
| Contains the type string to be printed with the current style. | |
| bColor | fFG_color = kDefault_color |
| std::ostringstream | fHeader {} |
| Contains the core message string to be printed with the current style. | |
| 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) | |
Friends | |
| tklog & | black (tklog &log) |
| tklog & | black_bg (tklog &log) |
| tklog & | blink (tklog &log) |
| tklog & | blue (tklog &log) |
| tklog & | blue_bg (tklog &log) |
| tklog & | bold (tklog &log) |
| tklog & | comment (tklog &log) |
| tklog & | cyan (tklog &log) |
| tklog & | cyan_bg (tklog &log) |
| tklog & | debug (tklog &log) |
| tklog & | do_endl (tklog &log) |
| General. | |
| tklog & | do_header (tklog &log) |
| Reimplementation of std::endl. | |
| tklog & | do_log (tklog &log) |
| To print the current message, then reset the log. | |
| tklog & | error (tklog &log) |
| tklog & | error_o (tklog &log) |
| tklog & | error_v (tklog &log) |
| tklog & | error_vo (tklog &log) |
| tklog & | green (tklog &log) |
| tklog & | green_bg (tklog &log) |
| tklog & | high_intensity (tklog &log) |
| Colors. | |
| tklog & | info (tklog &log) |
| tklog & | info_o (tklog &log) |
| tklog & | info_v (tklog &log) |
| Predefined macros with verbose option (print the name of the class and method) | |
| tklog & | info_vo (tklog &log) |
| tklog & | italic (tklog &log) |
| tklog & | purple (tklog &log) |
| tklog & | purple_bg (tklog &log) |
| tklog & | red (tklog &log) |
| tklog & | red_bg (tklog &log) |
| tklog & | regular (tklog &log) |
| Attributes. | |
| tklog & | reset (tklog &log) |
| To print the current message, then reset the log. | |
| tklog & | skip_line (tklog &log) |
| Reset the log style. | |
| tklog & | underline (tklog &log) |
| tklog & | warning (tklog &log) |
| tklog & | warning_o (tklog &log) |
| tklog & | warning_v (tklog &log) |
| tklog & | warning_vo (tklog &log) |
| tklog & | white (tklog &log) |
| tklog & | white_bg (tklog &log) |
| tklog & | yellow (tklog &log) |
| tklog & | yellow_bg (tklog &log) |
| 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 |