Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
log.hpp File Reference
#include <pulp/platform/detect.hpp>
#include <pulp/runtime/exceptions.hpp>
#include <atomic>
#include <cstdio>
#include <format>
#include <functional>
#include <memory>
#include <mutex>
#include <string>
#include <string_view>
#include <os/log.h>

Go to the source code of this file.

Classes

struct  pulp::runtime::detail::LogSinkRegistry

Namespaces

namespace  pulp
namespace  pulp::runtime
namespace  pulp::runtime::detail

Typedefs

using pulp::runtime::LogSink
 Receives every record after the platform writers.

Enumerations

enum class  pulp::runtime::LogLevel { pulp::runtime::Debug , pulp::runtime::Info , pulp::runtime::Warning , pulp::runtime::Error }

Functions

LogSinkRegistry & pulp::runtime::detail::log_sink_registry ()
bool & pulp::runtime::detail::in_log_sink_dispatch ()
void pulp::runtime::detail::dispatch_log_sink (LogLevel level, std::string_view category, std::string_view message)
void pulp::runtime::detail::log_impl (LogLevel level, std::string_view category, std::string_view message)
void pulp::runtime::detail::log_impl (LogLevel level, std::string_view message)
LogSink pulp::runtime::set_log_sink (LogSink sink)
 Install sink as the process-wide log sink and return the previous one (empty if none).
template<typename... Args>
void pulp::runtime::log_with_category (std::string_view category, LogLevel level, std::format_string< Args... > fmt, Args &&... args)
 Log with an explicit category (a subsystem tag such as "audio" or "net").
template<typename... Args>
void pulp::runtime::log (LogLevel level, std::format_string< Args... > fmt, Args &&... args)
template<typename... Args>
void pulp::runtime::log_debug (std::format_string< Args... > fmt, Args &&... args)
template<typename... Args>
void pulp::runtime::log_info (std::format_string< Args... > fmt, Args &&... args)
template<typename... Args>
void pulp::runtime::log_warn (std::format_string< Args... > fmt, Args &&... args)
template<typename... Args>
void pulp::runtime::log_error (std::format_string< Args... > fmt, Args &&... args)

Variables

constexpr std::string_view pulp::runtime::kDefaultLogCategory = "pulp"
 Category used by log_info and the other level helpers.