btllib

status.hpp
1
4#ifndef BTLLIB_STATUS_HPP
5#define BTLLIB_STATUS_HPP
6
7#include <cstdlib>
8#include <cstring>
9#include <ctime>
10#include <iostream>
11#include <string>
12
13 namespace btllib {
14
15 constexpr const char* PRINT_COLOR_INFO = "\33[32m";
16 constexpr const char* PRINT_COLOR_WARNING = "\33[33m";
17 constexpr const char* PRINT_COLOR_ERROR = "\33[31m";
18 constexpr const char* PRINT_COLOR_END = "\33[0m";
19
20std::string
21get_time();
22
28 void
29 log_info(const std::string& msg);
30
36 void
37 log_warning(const std::string& msg);
38
44 void
45 log_error(const std::string& msg);
46
53 void
54 check_info(bool condition, const std::string& msg);
55
62 void
63 check_warning(bool condition, const std::string& msg);
64
73 void
74 check_error(bool condition, const std::string& msg);
75
76std::string
77get_strerror();
78
86 void
87 check_stream(const std::ios& stream, const std::string& name);
88
89} // namespace btllib
90
91#endif
btllib
Definition: bloom_filter.hpp:16
btllib::log_warning
void log_warning(const std::string &msg)
btllib::check_error
void check_error(bool condition, const std::string &msg)
btllib::check_warning
void check_warning(bool condition, const std::string &msg)
btllib::check_stream
void check_stream(const std::ios &stream, const std::string &name)
btllib::log_info
void log_info(const std::string &msg)
btllib::log_error
void log_error(const std::string &msg)
btllib::check_info
void check_info(bool condition, const std::string &msg)