SoapySDR  0.3.0-g02fc7af6
Vendor and platform neutral SDR interface library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Logger.h
Go to the documentation of this file.
1 
13 #pragma once
14 #include <SoapySDR/Config.h>
15 #include <stdarg.h>
16 
17 typedef enum
18 {
29 
31 #define SOAPY_SDR_SSI SOAPY_SDR_SSI
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
42 SOAPY_SDR_API void SoapySDR_log(const SoapySDRLogLevel logLevel, const char *message);
43 
50 SOAPY_SDR_API void SoapySDR_vlogf(const SoapySDRLogLevel logLevel, const char *format, va_list argList);
51 
57 static inline void SoapySDR_logf(const SoapySDRLogLevel logLevel, const char *format, ...)
58 {
59  va_list argList;
60  va_start(argList, format);
61  SoapySDR_vlogf(logLevel, format, argList);
62  va_end(argList);
63 }
64 
68 typedef void (*SoapySDRLogHandler)(const SoapySDRLogLevel logLevel, const char *message);
69 
75 
76 #ifdef __cplusplus
77 }
78 #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:21
A fatal error. The application will most likely terminate. This is the highest priority.
Definition: Logger.h:19
SoapySDRLogLevel
Definition: Logger.h:17
A notice, which is an information with just a higher priority.
Definition: Logger.h:23
static void SoapySDR_logf(const SoapySDRLogLevel logLevel, const char *format,...)
Definition: Logger.h:57
#define SOAPY_SDR_SSI
Compile-time detection macro for SSI feature.
Definition: Logger.h:31
A critical error. The application might not be able to continue running successfully.
Definition: Logger.h:20
#define SOAPY_SDR_API
Definition: Config.h:41
A debugging message.
Definition: Logger.h:25
void(* SoapySDRLogHandler)(const SoapySDRLogLevel logLevel, const char *message)
Definition: Logger.h:68
A tracing message. This is the lowest priority.
Definition: Logger.h:26
An informational message, usually denoting the successful completion of an operation.
Definition: Logger.h:24
A warning. An operation completed with an unexpected result.
Definition: Logger.h:22