SoapySDR: Logger.hpp Source File

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

Loading...
Searching...
No Matches
Logger.hpp
Go to the documentation of this file.
1
13
14#pragma once
15#include <SoapySDR/Logger.h>
16#include <string>
17#include <cstdarg>
18
19namespace SoapySDR
20{
21
22 typedef SoapySDRLogLevel LogLevel;
23
29 SOAPY_SDR_API void log(const LogLevel logLevel, const std::string &message);
30
37 SOAPY_SDR_API void vlogf(const SoapySDRLogLevel logLevel, const char *format, va_list argList);
38
44 static inline void logf(const SoapySDRLogLevel logLevel, const char *format, ...)
45{
46 va_list argList;
47 va_start(argList, format);
48 SoapySDR::vlogf(logLevel, format, argList);
49 va_end(argList);
50}
51
55 typedef SoapySDRLogHandler LogHandler;
56
62 SOAPY_SDR_API void registerLogHandler(const LogHandler &handler);
63
68 SOAPY_SDR_API void setLogLevel(const LogLevel logLevel);
69
73 SOAPY_SDR_API LogLevel getLogLevel(void);
74
75}
SOAPY_SDR_API
#define SOAPY_SDR_API
Definition Config.h:41
Logger.h
SoapySDRLogLevel
SoapySDRLogLevel
Definition Logger.h:31
SoapySDRLogHandler
void(* SoapySDRLogHandler)(const SoapySDRLogLevel logLevel, const char *message)
Definition Logger.h:81
SoapySDR
Definition ConverterPrimitives.hpp:15
SoapySDR::LogLevel
SoapySDRLogLevel LogLevel
Definition Logger.hpp:22
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:55
SoapySDR::getLogLevel
SOAPY_SDR_API LogLevel getLogLevel(void)
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:44