OpenVPN 3 Core Library
Loading...
Searching...
No Matches
logbase_class.hpp
Go to the documentation of this file.
1// OpenVPN -- An application to securely tunnel IP networks
2// over a single port, with support for SSL/TLS-based
3// session authentication and key exchange,
4// packet encryption, packet authentication, and
5// packet compression.
6//
7// Copyright (C) 2012- OpenVPN Inc.
8//
9// SPDX-License-Identifier: MPL-2.0 OR AGPL-3.0-only WITH openvpn3-openssl-exception
10//
11
12#pragma once
13
14#include <string>
15
16#include <openvpn/common/rc.hpp>
17
18#define OPENVPN_LOG_CLASS openvpn::LogBase
19
20namespace openvpn {
21
25struct LogBase : RC<thread_safe_refcount>
26{
27 // As demonstrated here by the comment out of Ptr, objects of type LogBase are
28 // never used in the intrusive pointer mode. However, removing the base class
29 // exposes other types derived from LogBase (e.g., RunContextBase) which are reliant
30 // upon the RC base class here. FIXME!
31
32 // typedef RCPtr<LogBase> Ptr;
33
34 virtual void log(const std::string &str) = 0;
35};
36
37} // namespace openvpn
Reference count base class for objects tracked by RCPtr. Disallows copying and assignment.
Definition rc.hpp:912
The logging interface, simple, logs a string.
virtual void log(const std::string &str)=0
os<< "Session Name: "<< tbc-> session_name<< '\n';os<< "Layer: "<< tbc-> layer str()<< '\n'