SklavaBot 0.1.0
Telegram Bot in C++
Loading...
Searching...
No Matches
utils.hpp File Reference
#include <cstdint>
#include <iostream>
#include <string>

Go to the source code of this file.

Namespaces

namespace  tools
 
namespace  LOG
 Defined LOG types.
 

Macros

#define FG_BRED   "\033[1;31m"
 
#define FG_BYELLOW   "\033[1;33m"
 
#define FG_BGREEN   "\033[1;32m"
 
#define FG_BWHITE   "\033[1;37m"
 
#define RESET   "\033[0m"
 

Functions

void tools::flush ()
 Flush stdin.
 
void tools::log_cmd (std::string command, std::string user, std::int32_t timestamp, const std::string log_type)
 Function to print a better log.
 

Variables

const std::string LOG::Info = FG_BWHITE "[INFO]" RESET
 
const std::string LOG::Warn = FG_BYELLOW "[WARN]" RESET
 
const std::string LOG::Error = FG_BRED "[ERROR]" RESET
 
const std::string LOG::Debug = FG_BGREEN "[DEBUG]" RESET
 

Macro Definition Documentation

◆ FG_BGREEN

#define FG_BGREEN   "\033[1;32m"

Definition at line 40 of file utils.hpp.

◆ FG_BRED

#define FG_BRED   "\033[1;31m"

Definition at line 38 of file utils.hpp.

◆ FG_BWHITE

#define FG_BWHITE   "\033[1;37m"

Definition at line 41 of file utils.hpp.

◆ FG_BYELLOW

#define FG_BYELLOW   "\033[1;33m"

Definition at line 39 of file utils.hpp.

◆ RESET

#define RESET   "\033[0m"

Definition at line 42 of file utils.hpp.