OpenVPN 3 Core Library
Loading...
Searching...
No Matches
logsimple.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// Define simple logging macros that simply output to stdout
13
14#pragma once
15
16#include <iostream>
17
18#ifndef OPENVPN_LOG_STREAM
19#define OPENVPN_LOG_STREAM std::cout
20#endif
21
22#define OPENVPN_LOG(args) OPENVPN_LOG_STREAM << args << std::endl
23
24// like OPENVPN_LOG but no trailing newline
25#define OPENVPN_LOG_NTNL(args) OPENVPN_LOG_STREAM << args << std::flush
26
27#define OPENVPN_LOG_STRING(str) OPENVPN_LOG_STREAM << (str) << std::flush