SoapySDR  0.8.0-gab626068
Vendor and platform neutral SDR interface library
Logger.hpp
Go to the documentation of this file.
1 
13 #pragma once
14 #include <SoapySDR/Logger.h>
15 #include <string>
16 #include <cstdarg>
17 
18 namespace SoapySDR
19 {
20 
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 
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
SoapySDR::LogHandler
SoapySDRLogHandler LogHandler
Definition: Logger.hpp:54
SoapySDR::LogLevel
SoapySDRLogLevel LogLevel
Definition: Logger.hpp:21
SoapySDR::setLogLevel
SOAPY_SDR_API void setLogLevel(const LogLevel logLevel)
SoapySDR
Definition: ConverterPrimitives.hpp:14
SoapySDR::registerLogHandler
SOAPY_SDR_API void registerLogHandler(const LogHandler &handler)
Logger.h
SoapySDRLogHandler
void(* SoapySDRLogHandler)(const SoapySDRLogLevel logLevel, const char *message)
Definition: Logger.h:80
SoapySDR::vlogf
SOAPY_SDR_API void vlogf(const SoapySDRLogLevel logLevel, const char *format, va_list argList)
SoapySDRLogLevel
SoapySDRLogLevel
Definition: Logger.h:29
SoapySDR::logf
static void logf(const SoapySDRLogLevel logLevel, const char *format,...)
Definition: Logger.hpp:43
SoapySDR::log
SOAPY_SDR_API void log(const LogLevel logLevel, const std::string &message)