A C++ library for logging very fast and without allocating.
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

16 satır
360 B

#include <span>
#include "sl/logger.h"
#include "registry.h"
namespace sl {
void log(int log_id, std::string line) {
auto& slab = registry_map.at(log_id);
auto token = slab.reserve_write(line.size());
auto span = slab.get_buffer(token);
for(auto elem : line) {
span.front() = elem;
span = span.subspan(1);
}
slab.conclude_write(token);
}
}