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