|  | Fixposition SDK 0.0.0-heads/main-0-gb93ddb4
    Collection of c++ libraries and apps for use with Fixposition products on Linux | 
Fixposition SDK: Logging. More...
#include <cinttypes>#include <cstdarg>#include <cstdint>#include <sstream>#include "string.hpp"#include "time.hpp"Go to the source code of this file.
| Classes | |
| struct | fpsdk::common::logging::LoggingParams | 
| Logging parameters.  More... | |
| Namespaces | |
| namespace | fpsdk | 
| Fixposition SDK. | |
| namespace | fpsdk::common | 
| Fixposition SDK: Common library. | |
| namespace | fpsdk::common::logging | 
| Logging. | |
| Macros | |
| #define | IF_TRACE(...) | 
| Conditional compilation for non-Release builds. | |
| Printf() style logging | |
| For example: INFO("Hello world, the number is %d", 42); | |
| #define | FATAL(...) | 
| Print a fatal message. | |
| #define | ERROR(...) | 
| Print a error message. | |
| #define | WARNING(...) | 
| Print a warning message. | |
| #define | NOTICE(...) | 
| Print a notice message. | |
| #define | INFO(...) | 
| Print a info message. | |
| #define | DEBUG(...) | 
| Print a debug message. | |
| #define | DEBUG_HEXDUMP(data, size, prefix, ...) | 
| Print a debug hexdump. | |
| #define | TRACE(...) | 
| Print a trace message (only debug builds, compiled out in release builds) | |
| #define | TRACE_HEXDUMP(data, size, prefix, ...) | 
| Print a trace hexdump (only debug builds, compiled out in release builds) | |
| #define | ERROR_THR(millis, ...) | 
| Print a error message (throttled) | |
| #define | WARNING_THR(millis, ...) | 
| Print a warning message (throttled) | |
| #define | NOTICE_THR(millis, ...) | 
| Print a notice message (throttled) | |
| #define | INFO_THR(millis, ...) | 
| Print a info message (throttled) | |
| #define | DEBUG_THR(millis, ...) | 
| Print a debug message (throttled) | |
| C++ style logging | |
| For example, INFO_S("Hello world, the number is " << 42); | |
| #define | FATAL_S(expr) | 
| Print a fatal message. | |
| #define | ERROR_S(expr) | 
| Print a error message. | |
| #define | WARNING_S(expr) | 
| Print a warning message. | |
| #define | DEBUG_S(expr) | 
| Print a debug message. | |
| #define | NOTICE_S(expr) | 
| Print a notice message. | |
| #define | INFO_S(expr) | 
| Print a info message. | |
| #define | TRACE_S(expr) | 
| Print a trace message (only debug builds, compiled out in release builds) | |
| Typedefs | |
| using | fpsdk::common::logging::LoggingWriteFunc = void (*)(const LoggingParams& params, const LoggingLevel level, const char* str) | 
| Custom logging write (to screen, file, ...) function signature. | |
| Enumerations | |
| enum class | fpsdk::common::logging::LoggingLevel : int { fpsdk::common::logging::FATAL = 2 , fpsdk::common::logging::ERROR = 3 , fpsdk::common::logging::WARNING = 4 , fpsdk::common::logging::NOTICE = 5 , fpsdk::common::logging::INFO = 6 , fpsdk::common::logging::DEBUG = 7 , fpsdk::common::logging::TRACE = 8 } | 
| Logging verbosity levels, default is INFO.  More... | |
| enum class | fpsdk::common::logging::LoggingColour { fpsdk::common::logging::AUTO = 0 , fpsdk::common::logging::YES , fpsdk::common::logging::NO , fpsdk::common::logging::JOURNAL } | 
| Logging "colours".  More... | |
| enum class | fpsdk::common::logging::LoggingTimestamps { fpsdk::common::logging::NONE = 0 , fpsdk::common::logging::RELATIVE , fpsdk::common::logging::ABSOLUTE } | 
| Logging timestamps.  More... | |
| Functions | |
| LoggingLevel & | fpsdk::common::logging::operator++ (LoggingLevel &level) | 
| Increase verbosity (pre-increment) | |
| LoggingLevel & | fpsdk::common::logging::operator-- (LoggingLevel &level) | 
| Decrease verbosity (pre-decrement) | |
| LoggingLevel | fpsdk::common::logging::operator++ (LoggingLevel &level, int) | 
| Increase verbosity (post-increment) | |
| LoggingLevel | fpsdk::common::logging::operator-- (LoggingLevel &level, int) | 
| Decrease verbosity (post-decrement) | |
| const char * | fpsdk::common::logging::LoggingLevelStr (const LoggingLevel level) | 
| Stringify log level. | |
| bool | fpsdk::common::logging::LoggingIsLevel (const LoggingLevel level) | 
| Check if given level would print. | |
| const char * | fpsdk::common::logging::LoggingColourStr (const LoggingColour colour) | 
| Stringify log level. | |
| const char * | fpsdk::common::logging::LoggingTimestampsStr (const LoggingTimestamps timestamps) | 
| Stringify log level. | |
| void | fpsdk::common::logging::LoggingDefaultWriteFn (const LoggingParams ¶ms, const LoggingLevel level, const char *str) | 
| Default logging write function. | |
| LoggingParams | fpsdk::common::logging::LoggingSetParams (const LoggingParams ¶ms) | 
| Configure logging. | |
| LoggingParams | fpsdk::common::logging::LoggingGetParams () | 
| Get current logging params. | |
| void | fpsdk::common::logging::LoggingPrint (const LoggingLevel level, const std::size_t repeat, const char *fmt,...) PRINTF_ATTR(3) | 
| Print a log message. | |
| void | fpsdk::common::logging::LoggingHexdump (const LoggingLevel level, const uint8_t *data, const std::size_t size, const char *prefix, const char *fmt,...) PRINTF_ATTR(5) | 
| Print a hexdump. | |
Fixposition SDK: Logging.
* ___ ___ * \ \ / / * \ \/ / Copyright (c) Fixposition AG (www.fixposition.com) and contributors * / /\ \ License: see the LICENSE file * /__/ \__\ *
Definition in file logging.hpp.
| #define FATAL | ( | ... | ) | 
Print a fatal message.
Definition at line 73 of file logging.hpp.
| #define ERROR | ( | ... | ) | 
Print a error message.
Definition at line 77 of file logging.hpp.
| #define WARNING | ( | ... | ) | 
Print a warning message.
Definition at line 81 of file logging.hpp.
| #define NOTICE | ( | ... | ) | 
Print a notice message.
Definition at line 85 of file logging.hpp.
| #define INFO | ( | ... | ) | 
Print a info message.
Definition at line 89 of file logging.hpp.
| #define DEBUG | ( | ... | ) | 
Print a debug message.
Definition at line 93 of file logging.hpp.
| #define DEBUG_HEXDUMP | ( | data, | |
| size, | |||
| prefix, | |||
| ... ) | 
Print a debug hexdump.
Definition at line 97 of file logging.hpp.
| #define TRACE | ( | ... | ) | 
Print a trace message (only debug builds, compiled out in release builds)
Definition at line 103 of file logging.hpp.
| #define TRACE_HEXDUMP | ( | data, | |
| size, | |||
| prefix, | |||
| ... ) | 
Print a trace hexdump (only debug builds, compiled out in release builds)
Definition at line 107 of file logging.hpp.
| #define ERROR_THR | ( | millis, | |
| ... ) | 
Print a error message (throttled)
Definition at line 116 of file logging.hpp.
| #define WARNING_THR | ( | millis, | |
| ... ) | 
Print a warning message (throttled)
Definition at line 120 of file logging.hpp.
| #define NOTICE_THR | ( | millis, | |
| ... ) | 
Print a notice message (throttled)
Definition at line 124 of file logging.hpp.
| #define INFO_THR | ( | millis, | |
| ... ) | 
Print a info message (throttled)
Definition at line 128 of file logging.hpp.
| #define DEBUG_THR | ( | millis, | |
| ... ) | 
Print a debug message (throttled)
Definition at line 132 of file logging.hpp.
| #define FATAL_S | ( | expr | ) | 
Print a fatal message.
Definition at line 147 of file logging.hpp.
| #define ERROR_S | ( | expr | ) | 
Print a error message.
Definition at line 151 of file logging.hpp.
| #define WARNING_S | ( | expr | ) | 
Print a warning message.
Definition at line 155 of file logging.hpp.
| #define DEBUG_S | ( | expr | ) | 
Print a debug message.
Definition at line 159 of file logging.hpp.
| #define NOTICE_S | ( | expr | ) | 
Print a notice message.
Definition at line 163 of file logging.hpp.
| #define INFO_S | ( | expr | ) | 
Print a info message.
Definition at line 167 of file logging.hpp.
| #define TRACE_S | ( | expr | ) | 
Print a trace message (only debug builds, compiled out in release builds)
Definition at line 173 of file logging.hpp.
| #define IF_TRACE | ( | ... | ) | 
Conditional compilation for non-Release builds.
Definition at line 182 of file logging.hpp.