28 class PHOSPHOR_API TraceLog;
29 class PHOSPHOR_API TraceConfig;
62 virtual void operator()(
TraceLog&, std::lock_guard<TraceLog>&) = 0;
73 enum class BufferMode : char {
83 std::ostream& operator<<(std::ostream& stream,
const BufferMode mode);
90 void operator()(
const std::string* ptr);
104 using StringPtr = std::unique_ptr<const std::string, StringPtrDeleter>;
112 StringPtr make_String(
const std::string& str);
167 std::unique_ptr<TraceConfig> startup_trace;
201 TraceConfig(BufferMode _buffer_mode,
size_t _buffer_size);
214 BufferMode getBufferMode()
const;
219 size_t getBufferSize()
const;
239 std::shared_ptr<TracingStoppedCallback> _tracing_stopped_callback);
254 TraceConfig& setStopTracingOnDestruct(
bool _stop_tracing);
260 bool getStopTracingOnDestruct()
const;
269 TraceConfig& setCategories(
const std::vector<std::string>& enabled,
270 const std::vector<std::string>& disabled);
275 const std::vector<std::string>& getEnabledCategories()
const;
280 const std::vector<std::string>& getDisabledCategories()
const;
293 static TraceConfig fromString(
const std::string& config);
303 StringPtr toString()
const;
317 BufferMode buffer_mode = BufferMode::fixed;
318 size_t buffer_size = 0;
320 std::shared_ptr<TracingStoppedCallback> tracing_stopped_callback;
321 bool stop_tracing =
false;
323 std::vector<std::string> enabled_categories;
324 std::vector<std::string> disabled_categories;
Definition: trace_config.h:89
Definition: trace_log.h:54
Definition: trace_config.h:188
Definition: trace_config.h:58
Definition: trace_config.h:123
TraceLogConfig()
Definition: trace_config.h:128
Definition: category_registry.h:32
std::function< buffer_ptr(size_t generation, size_t buffer_size)> trace_buffer_factory
Definition: trace_buffer.h:360