SoapySDR  0.4.4-gdb459f4f
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 
60 SOAPY_SDR_API void registerLogHandler(const LogHandler &handler);
61 
66 SOAPY_SDR_API void setLogLevel(const LogLevel logLevel);
67 
68 }
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: Device.hpp:21
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