/usr/include/SoapySDR/Logger.hpp is in libsoapysdr-dev 0.6.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | ///
/// \file SoapySDR/Logger.hpp
///
/// Logger API for SoapySDR devices.
/// Implementations should use the logger rather than stdio.
/// The default log handler prints to stderr.
///
/// \copyright
/// Copyright (c) 2014-2015 Josh Blum
/// SPDX-License-Identifier: BSL-1.0
///
#pragma once
#include <SoapySDR/Logger.h>
#include <string>
#include <cstdarg>
namespace SoapySDR
{
typedef SoapySDRLogLevel LogLevel;
/*!
* Send a message to the registered logger.
* \param logLevel a possible logging level
* \param message a logger message string
*/
SOAPY_SDR_API void log(const LogLevel logLevel, const std::string &message);
/*!
* Send a message to the registered logger.
* \param logLevel a possible logging level
* \param format a printf style format string
* \param argList an argument list for the formatter
*/
SOAPY_SDR_API void vlogf(const SoapySDRLogLevel logLevel, const char *format, va_list argList);
/*!
* Send a message to the registered logger.
* \param logLevel a possible logging level
* \param format a printf style format string
*/
static inline void logf(const SoapySDRLogLevel logLevel, const char *format, ...)
{
va_list argList;
va_start(argList, format);
SoapySDR::vlogf(logLevel, format, argList);
va_end(argList);
}
/*!
* Typedef for the registered log handler function.
*/
typedef SoapySDRLogHandler LogHandler;
/*!
* Register a new system log handler.
* Platforms should call this to replace the default stdio handler.
*/
SOAPY_SDR_API void registerLogHandler(const LogHandler &handler);
/*!
* Set the log level threshold.
* Log messages with lower priority are dropped.
*/
SOAPY_SDR_API void setLogLevel(const LogLevel logLevel);
}
|