SoapySDR  0.7.1-g5838bc91
Vendor and platform neutral SDR interface library
Logger.h
Go to the documentation of this file.
1 
13 #pragma once
14 #include <SoapySDR/Config.h>
15 #include <stdarg.h>
16 
29 typedef enum
30 {
41 
43 #define SOAPY_SDR_SSI SOAPY_SDR_SSI
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
54 SOAPY_SDR_API void SoapySDR_log(const SoapySDRLogLevel logLevel, const char *message);
55 
62 SOAPY_SDR_API void SoapySDR_vlogf(const SoapySDRLogLevel logLevel, const char *format, va_list argList);
63 
69 static inline void SoapySDR_logf(const SoapySDRLogLevel logLevel, const char *format, ...)
70 {
71  va_list argList;
72  va_start(argList, format);
73  SoapySDR_vlogf(logLevel, format, argList);
74  va_end(argList);
75 }
76 
80 typedef void (*SoapySDRLogHandler)(const SoapySDRLogLevel logLevel, const char *message);
81 
88 
94 
95 #ifdef __cplusplus
96 }
97 #endif
SOAPY_SDR_API void SoapySDR_vlogf(const SoapySDRLogLevel logLevel, const char *format, va_list argList)
SOAPY_SDR_API void SoapySDR_registerLogHandler(const SoapySDRLogHandler handler)
SOAPY_SDR_API void SoapySDR_log(const SoapySDRLogLevel logLevel, const char *message)
An error. An operation did not complete successfully, but the application as a whole is not affected...
Definition: Logger.h:33
A fatal error. The application will most likely terminate. This is the highest priority.
Definition: Logger.h:31
SoapySDRLogLevel
Definition: Logger.h:29
A notice, which is an information with just a higher priority.
Definition: Logger.h:35
SOAPY_SDR_API void SoapySDR_setLogLevel(const SoapySDRLogLevel logLevel)
static void SoapySDR_logf(const SoapySDRLogLevel logLevel, const char *format,...)
Definition: Logger.h:69
#define SOAPY_SDR_SSI
Compile-time detection macro for SSI feature.
Definition: Logger.h:43
A critical error. The application might not be able to continue running successfully.
Definition: Logger.h:32
#define SOAPY_SDR_API
Definition: Config.h:41
A debugging message.
Definition: Logger.h:37
A tracing message. This is the lowest priority.
Definition: Logger.h:38
void(* SoapySDRLogHandler)(const SoapySDRLogLevel logLevel, const char *message)
Definition: Logger.h:80
An informational message, usually denoting the successful completion of an operation.
Definition: Logger.h:36
A warning. An operation completed with an unexpected result.
Definition: Logger.h:34