Release v0.3.0
Some checks failed
Docker Build & Publish / build (push) Has been cancelled

This commit is contained in:
Nicholas Orlowsky 2025-02-24 19:29:43 -05:00
parent c07f3ebf81
commit 9b5719f9be
17 changed files with 612 additions and 308 deletions

View file

@ -1,5 +1,4 @@
#include "./log.hpp"
#include <syncstream>
namespace anthracite::log {
enum LOG_LEVEL Logger::_level = LOG_LEVEL_NONE;
@ -28,8 +27,8 @@ int LogBuf::sync()
if (this->_level <= logger._level) {
char thread_name[100];
pthread_getname_np(pthread_self(), thread_name, 100);
std::osyncstream(std::cout) << "[" << this->_tag << "] [" << syscall(SYS_gettid) << ":" << thread_name << "] "<< this->str();
std::cout.flush();
_output_stream << "[" << this->_tag << "] [" << syscall(SYS_gettid) << ":" << thread_name << "] " << this->str();
_output_stream.flush();
}
this->str("");
return 0;

View file

@ -5,6 +5,7 @@
#include <sstream>
#include <inttypes.h>
#include <memory>
#include <string>
#include "../http/request.hpp"
#include "../http/response.hpp"