SoapySDR: Logger.hpp Source File

| SoapySDR 0.8.1-ARCH Vendor and platform neutral SDR interface library

Logger.hpp
Go to the documentation of this file.
1
12
13#pragma once
14#include <SoapySDR/Logger.h>
15#include <string>
16#include <cstdarg>
17
18namespace SoapySDR
19{
20
21 typedef SoapySDRLogLevel LogLevel;
22
28 SOAPY_SDR_API void log(const LogLevel logLevel, const std::string &message);
29
36 SOAPY_SDR_API void vlogf(const SoapySDRLogLevel logLevel, const char *format, va_list argList);
37
43 static inline void logf(const SoapySDRLogLevel logLevel, const char *format, ...)
44{
45 va_list argList;
46 va_start(argList, format);
47 SoapySDR::vlogf(logLevel, format, argList);
48 va_end(argList);
49}
50
54 typedef SoapySDRLogHandler LogHandler;
55
61 SOAPY_SDR_API void registerLogHandler(const LogHandler &handler);
62
67 SOAPY_SDR_API void setLogLevel(const LogLevel logLevel);
68
69}
SOAPY_SDR_API
#define SOAPY_SDR_API
Definition: Config.h:41
Logger.h
SoapySDRLogLevel
SoapySDRLogLevel
Definition: Logger.h:30
SoapySDRLogHandler
void(* SoapySDRLogHandler)(const SoapySDRLogLevel logLevel, const char *message)
Definition: Logger.h:80
SoapySDR
Definition: ConverterPrimitives.hpp:15
SoapySDR::LogLevel
SoapySDRLogLevel LogLevel
Definition: Logger.hpp:21
SoapySDR::vlogf
SOAPY_SDR_API void vlogf(const SoapySDRLogLevel logLevel, const char *format, va_list argList)
SoapySDR::setLogLevel
SOAPY_SDR_API void setLogLevel(const LogLevel logLevel)
SoapySDR::registerLogHandler
SOAPY_SDR_API void registerLogHandler(const LogHandler &handler)
SoapySDR::LogHandler
SoapySDRLogHandler LogHandler
Definition: Logger.hpp:54
SoapySDR::log
SOAPY_SDR_API void log(const LogLevel logLevel, const std::string &message)
SoapySDR::logf
static void logf(const SoapySDRLogLevel logLevel, const char *format,...)
Definition: Logger.hpp:43