|
|
- #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);
- }
- }
|