 |
SWC-DB
v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
|
Go to the documentation of this file.
12 namespace SWC {
namespace Core {
21 const char* get_name(uint8_t priority) noexcept {
31 default:
return "NOTSET";
66 : mutex(), m_name(), m_logs_path(),
68 m_priority(
LOG_INFO), m_show_line_numbers(true),
69 m_daemon(false), m_next_time(0) {
92 throw std::runtime_error(
93 "SWC::Core::LogWriter::initialize err="
100 SWC_SHOULD_NOT_INLINE
102 auto t = ::time(
nullptr);
105 t -= (t/86400) * 86400;
110 #if defined(__MINGW64__) || defined(_WIN32)
111 #define SWC_MKDIR(_path, _perms) ::mkdir(_path)
113 #define SWC_MKDIR(_path, _perms) ::mkdir(_path, _perms)
147 std::cerr.rdbuf(std::cout.rdbuf());
161 SWC_SHOULD_NOT_INLINE
176 SWC_SHOULD_NOT_INLINE
178 const char* fmt, ...) noexcept {
194 SWC_SHOULD_NOT_INLINE
void daemon(const std::string &logs_path)
constexpr SWC_CAN_INLINE const std::string & name() const noexcept
const char * get_text(const int err) noexcept
void initialize(const std::string &name)
The SWC-DB C++ namespace 'SWC'.
void _print_prefix(uint8_t priority, const char *filen, int fline)
void log(uint8_t priority, const char *fmt,...) noexcept __attribute__((format(printf
static uint8_t SWC_PURE_FUNC from_string(const std::string &loglevel) noexcept
constexpr SWC_CAN_INLINE bool show_line_numbers() const noexcept
void _renew_files(time_t secs)
#define SWC_MKDIR(_path, _perms)
std::string filepath(cid_t cid)
void _time_and_level(uint8_t priority)
SWC_CAN_INLINE std::string to_string(const BitFieldInt< T, SZ > &v)
bool str_case_eq(const char *s1, const char *s2, size_t count) noexcept SWC_ATTRIBS((SWC_ATTRIB_O3))
static std::string repr(uint8_t priority)