SklavaBot
0.1.0
Telegram Bot in C++
Loading...
Searching...
No Matches
utils.hpp
Go to the documentation of this file.
1
#ifndef HPP_UTILS
2
#define HPP_UTILS
3
4
#include <cstdint>
5
#include <iostream>
6
#include <string>
7
8
namespace
tools
{
15
void
flush
();
16
28
void
log_cmd
(std::string command, std::string user, std::int32_t timestamp,
29
const
std::string log_type);
30
}
// namespace tools
31
36
namespace
LOG
{
37
38
#define FG_BRED "\033[1;31m"
39
#define FG_BYELLOW "\033[1;33m"
40
#define FG_BGREEN "\033[1;32m"
41
#define FG_BWHITE "\033[1;37m"
42
#define RESET "\033[0m"
43
44
const
std::string
Info
=
FG_BWHITE
"[INFO]"
RESET
;
45
const
std::string
Warn
=
FG_BYELLOW
"[WARN]"
RESET
;
46
const
std::string
Error
=
FG_BRED
"[ERROR]"
RESET
;
47
const
std::string
Debug
=
FG_BGREEN
"[DEBUG]"
RESET
;
48
}
// namespace LOG
49
50
#endif
LOG
Defined LOG types.
Definition
utils.hpp:36
LOG::Warn
const std::string Warn
Definition
utils.hpp:45
LOG::Info
const std::string Info
Definition
utils.hpp:44
LOG::Error
const std::string Error
Definition
utils.hpp:46
LOG::Debug
const std::string Debug
Definition
utils.hpp:47
tools
Definition
metar.hpp:6
tools::log_cmd
void log_cmd(std::string command, std::string user, std::int32_t timestamp, const std::string log_type)
Function to print a better log.
Definition
utils.cpp:17
tools::flush
void flush()
Flush stdin.
Definition
utils.cpp:12
FG_BRED
#define FG_BRED
Definition
utils.hpp:38
FG_BYELLOW
#define FG_BYELLOW
Definition
utils.hpp:39
FG_BGREEN
#define FG_BGREEN
Definition
utils.hpp:40
RESET
#define RESET
Definition
utils.hpp:42
FG_BWHITE
#define FG_BWHITE
Definition
utils.hpp:41
lib
include
utils.hpp
Generated on Tue Jun 6 2023 18:20:31 for SklavaBot by
1.9.7