EduArt Sensor Ring Library 3.0.1
Loading...
Searching...
No Matches
LoggerClient.hpp
Go to the documentation of this file.
1// Copyright (c) 2025 EduArt Robotik GmbH
2
9
10#pragma once
11
12#include <ostream>
13#include <string>
14
16
17namespace eduart {
18
19namespace logger {
20
25enum class SENSORRING_API LogVerbosity {
26 Debug,
27 Info,
28 Warning,
29 Error,
30 Exception
31};
32
38SENSORRING_API std::string toString(LogVerbosity verbosity) noexcept;
39
45SENSORRING_API std::ostream& operator<<(std::ostream& os, LogVerbosity verbosity) noexcept;
46
51class SENSORRING_API LoggerClient {
52public:
54 virtual ~LoggerClient() = default;
55
61 virtual void onOutputLog([[maybe_unused]] logger::LogVerbosity verbosity, [[maybe_unused]] const std::string& msg) {};
62};
63
64} // namespace logger
65
66} // namespace eduart
SENSORRING_API std::string toString(LogVerbosity verbosity) noexcept
Function to convert the LogVerbosity enum class members to string.
SENSORRING_API std::ostream & operator<<(std::ostream &os, LogVerbosity verbosity) noexcept
Output stream operator for the LogVerbosity enum class members.
Control the import and export of Windows DLL symbols.
Observer interface of the Logger class. Defines the callback method that is triggered by the Logger.
Definition LoggerClient.hpp:51
virtual void onOutputLog(logger::LogVerbosity verbosity, const std::string &msg)
Definition LoggerClient.hpp:61
virtual ~LoggerClient()=default
Destructor.