| IOLink 1.11.0

Loading...
Searching...
No Matches
Logger.h
1#pragma once
2
3#include <iolink/IOLinkAPI.h>
4
5 namespace iolink
6{
7
17 enum class LogLevel
18{
20 LOG_OFF,
21
23 LOG_CRITICAL,
24
26 LOG_ERR,
27
33 LOG_WARNING,
34
38 LOG_INFO,
39
41 LOG_DEBUG,
42
47 LOG_TRACE,
48};
49
59 class IOLINK_API Logger
60{
61 public:
73 static void init(LogLevel level);
74
78 static LogLevel logLevel();
79};
80
81} // end namespace iolink
iolink::Logger
Manage IOLink logging.
Definition Logger.h:60
iolink::Logger::init
static void init(LogLevel level)
Forces initialization of the logging system with a given log level.
iolink::Logger::logLevel
static LogLevel logLevel()
Return the log level of the logging system.
iolink
All IOLink symbols are enclosed in this namespace.
Definition ArrayX.h:8
iolink::LogLevel
LogLevel
The level of logs to display.
Definition Logger.h:18
iolink::LogLevel::LOG_CRITICAL
@ LOG_CRITICAL
Severe errors that cause premature termination.
iolink::LogLevel::LOG_INFO
@ LOG_INFO
Interesting runtime events (startup/shutdown).
iolink::LogLevel::LOG_OFF
@ LOG_OFF
No logging at all.
iolink::LogLevel::LOG_TRACE
@ LOG_TRACE
Only for "tracing" the code and trying to find one part of a function specifically.
iolink::LogLevel::LOG_ERR
@ LOG_ERR
Runtime errors or unexpected conditions.
iolink::LogLevel::LOG_WARNING
@ LOG_WARNING
Use of deprecated APIs, poor use of API, 'almost' errors, other runtime situations that are undesirab...
iolink::LogLevel::LOG_DEBUG
@ LOG_DEBUG
Detailed information on the flow through the system.