open62541pp 0.16.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
log.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string_view>
4
5#include "open62541pp/detail/open62541/common.h" // UA_LogLevel, UA_LogCategory, UA_Logger
7
8namespace opcua {
9
10/**
11 * Log level.
12 * @see UA_LogLevel
13 */
22
23/**
24 * Log category.
25 * @see UA_LogCategory
26 */
36
37/**
38 * Logger base class.
39 *
40 * Custom logger can be implemented by deriving from this class and overwriting the log function.
41 */
42class LoggerBase : public PluginAdapter<UA_Logger> {
43public:
44 virtual void log(LogLevel level, LogCategory category, std::string_view msg) = 0;
45
46 UA_Logger create(bool ownsAdapter) override;
47};
48
49namespace detail {
50void clear(UA_Logger& logger) noexcept;
51} // namespace detail
52
53} // namespace opcua
High-level client class.
Definition client.hpp:121
Logger base class.
Definition log.hpp:42
UA_Logger create(bool ownsAdapter) override
virtual void log(LogLevel level, LogCategory category, std::string_view msg)=0
Base class to implement plugin adapters.
High-level server class.
Definition server.hpp:132
High-level session class to manage client sessions.
Definition session.hpp:20
UA_LOGLEVEL_TRACE
UA_LOGLEVEL_DEBUG
UA_LOGLEVEL_INFO
UA_LOGLEVEL_ERROR
UA_LOGLEVEL_WARNING
UA_LOGLEVEL_FATAL
UA_LOGCATEGORY_NETWORK
UA_LOGCATEGORY_USERLAND
UA_LOGCATEGORY_SERVER
UA_LOGCATEGORY_SESSION
UA_LOGCATEGORY_SECURITYPOLICY
UA_LOGCATEGORY_CLIENT
UA_LOGCATEGORY_SECURECHANNEL
constexpr void clear(T &native, const UA_DataType &type) noexcept
LogLevel
Log level.
Definition log.hpp:14
LogCategory
Log category.
Definition log.hpp:27