MIP_SDK  latest-2-g34f3e39
MicroStrain Communications Library for embedded systems
logging.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
5 
6 namespace microstrain
7 {
8 
9 enum class LogLevel
10 {
18 };
19 
20 //namespace logging
21 //{
22 // using Callback = ::microstrain_log_callback;
23 //
24 // void init(Callback callback, LogLevel max_level, void* user=nullptr);
25 //
26 // Callback get_callback() { return ::microstrain_logging_callback(); }
27 // LogLevel max_level() { return static_cast<LogLevel>(::microstrain_logging_level()); }
28 // void* user_pointer() { return ::microstrain_logging_user_data(); }
29 //
30 // //void log(LogLevel level, const char* fmt, ...) { ::microstrain_logging_log(level, fmt, args); }
31 //}
32 
33 } // namespace microstrain
MICROSTRAIN_LOG_LEVEL_DEBUG
#define MICROSTRAIN_LOG_LEVEL_DEBUG
Debug logs are logged for debug purposes.
Definition: logging.h:32
MICROSTRAIN_LOG_LEVEL_OFF
#define MICROSTRAIN_LOG_LEVEL_OFF
Signifies that the log is turned off.
Definition: logging.h:27
MICROSTRAIN_LOG_LEVEL_INFO
#define MICROSTRAIN_LOG_LEVEL_INFO
Info logs are logged when some general info needs to be conveyed to the user.
Definition: logging.h:31
MICROSTRAIN_LOG_LEVEL_ERROR
#define MICROSTRAIN_LOG_LEVEL_ERROR
Error logs are logged when an error occurs.
Definition: logging.h:29
MICROSTRAIN_LOG_LEVEL_WARN
#define MICROSTRAIN_LOG_LEVEL_WARN
Warning logs are logged when something concerning happens that may or not be a mistake.
Definition: logging.h:30
MICROSTRAIN_LOG_LEVEL_TRACE
#define MICROSTRAIN_LOG_LEVEL_TRACE
Trace logs are logged in similar cases to debug logs but can be logged in tight loops.
Definition: logging.h:33
microstrain::LogLevel::ERROR
@ ERROR
microstrain::LogLevel::FATAL
@ FATAL
microstrain::LogLevel::OFF
@ OFF
logging.h
microstrain::LogLevel::DEBUG
@ DEBUG
microstrain::LogLevel::WARN
@ WARN
microstrain::LogLevel
LogLevel
Definition: logging.hpp:9
MICROSTRAIN_LOG_LEVEL_FATAL
#define MICROSTRAIN_LOG_LEVEL_FATAL
Fatal logs are logged when an unrecoverable error occurs.
Definition: logging.h:28
microstrain::LogLevel::INFO
@ INFO
microstrain
Definition: embedded_time.h:8
microstrain::LogLevel::TRACE
@ TRACE