guanaqo main
Utilities for scientific software
Loading...
Searching...
No Matches
trace.cpp File Reference
#include <guanaqo/trace.hpp>
#include <list>
#include <mutex>
#include <thread>
Include dependency graph for trace.cpp:

Go to the source code of this file.

Namespaces

namespace  guanaqo

Concepts

concept  guanaqo::pthread_self_converts_to

Functions

std::size_t guanaqo::get_thread_id ()
static auto guanaqo::new_trace_logger (size_t size)
size_t guanaqo::trace_logger_set_default_size (size_t size)
 Set the default capacity for trace loggers created by get_trace_logger().
TraceLoggerguanaqo::get_trace_logger ()
 Get a reference to the global (but thread-local) trace logger instance.
void guanaqo::drop_trace_loggers (const std::function< void(std::shared_ptr< TraceLogger >)> &callback=nullptr)
 Like for_each_trace_logger, but also forgets about all loggers.
void guanaqo::for_each_trace_logger (const std::function< void(TraceLogger &)> &callback)
 Call callback for each trace logger instance.

Variables

static std::mutex guanaqo::trace_loggers_mutex
static std::list< std::shared_ptr< TraceLogger > > guanaqo::trace_loggers
static std::atomic< size_t > guanaqo::default_trace_logger_size = 16'384