SoapySDR  0.7.1-g5838bc91
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 void vlogf(const SoapySDRLogLevel logLevel, const char *format, va_list argList)
SoapySDRLogLevel
Definition: Logger.h:29
SoapySDRLogHandler LogHandler
Definition: Logger.hpp:54
static void logf(const SoapySDRLogLevel logLevel, const char *format,...)
Definition: Logger.hpp:43
Definition: ConverterPrimitives.hpp:14
SOAPY_SDR_API void setLogLevel(const LogLevel logLevel)
SOAPY_SDR_API void registerLogHandler(const LogHandler &handler)
SOAPY_SDR_API void log(const LogLevel logLevel, const std::string &message)
#define SOAPY_SDR_API
Definition: Config.h:41
SoapySDRLogLevel LogLevel
Definition: Logger.hpp:21
void(* SoapySDRLogHandler)(const SoapySDRLogLevel logLevel, const char *message)
Definition: Logger.h:80