YARP
Yet Another Robot Platform
LogForwarder.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_OS_IMPL_LOGFORWARDER_H
7#define YARP_OS_IMPL_LOGFORWARDER_H
8
9#include <yarp/os/api.h>
10
11#include <yarp/os/Port.h>
12
13#include <mutex>
14#include <string>
15
16namespace yarp::os::impl {
17
19{
20public:
22 static LogForwarder& getInstance();
23
24 void forward(const std::string& message);
25 static void shutdown();
26
27private:
29 LogForwarder(LogForwarder const&) = delete;
30 LogForwarder& operator=(LogForwarder const&) = delete;
31
32 std::mutex mutex;
33 yarp::os::Port outputPort;
34 static bool started;
35};
36
37} // namespace yarp::os::impl
38
39#endif // YARP_OS_IMPL_LOGFORWARDER_H
A mini-server for network communication.
Definition: Port.h:46
The components from which ports and connections are built.
#define YARP_os_impl_API
Definition: api.h:46