Fast DDS
Version 3.6.1.0
Fast DDS
Toggle main menu visibility
Loading...
Searching...
No Matches
StdoutErrConsumer.hpp
1
// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#ifndef FASTDDS_DDS_LOG__STDOUTERRCONSUMER_HPP
16
#define FASTDDS_DDS_LOG__STDOUTERRCONSUMER_HPP
17
18
#include <fastdds/dds/log/Log.hpp>
19
#include <fastdds/dds/log/OStreamConsumer.hpp>
20
#include <iostream>
21
22
namespace
eprosima
{
23
namespace
fastdds
{
24
namespace
dds
{
25
32
class
StdoutErrConsumer
:
public
OStreamConsumer
33
{
34
public
:
35
36
virtual
~StdoutErrConsumer
() =
default
;
37
47
FASTDDS_EXPORTED_API
virtual
void
stderr_threshold
(
48
const
Log::Kind
& kind);
49
54
FASTDDS_EXPORTED_API
virtual
Log::Kind
stderr_threshold
()
const
;
55
59
static
constexpr
Log::Kind
STDERR_THRESHOLD_DEFAULT
=
Log::Kind::Warning
;
60
61
protected
:
62
67
FASTDDS_EXPORTED_API
virtual
std::ostream&
get_stream
(
68
const
Log::Entry
& entry)
override
;
69
70
private
:
71
72
Log::Kind
stderr_threshold_ =
STDERR_THRESHOLD_DEFAULT
;
73
74
};
75
76
}
// namespace dds
77
}
// namespace fastdds
78
}
// namespace eprosima
79
80
#endif
// FASTDDS_DDS_LOG__STDOUTERRCONSUMER_HPP
eprosima::fastdds::dds::Log::Kind
Kind
Types of log entry.
Definition
Log.hpp:90
eprosima::fastdds::dds::Log::Warning
@ Warning
Definition
Log.hpp:92
eprosima::fastdds::dds::OStreamConsumer
Definition
OStreamConsumer.hpp:32
eprosima::fastdds::dds::StdoutErrConsumer
Definition
StdoutErrConsumer.hpp:33
eprosima::fastdds::dds::StdoutErrConsumer::stderr_threshold
virtual FASTDDS_EXPORTED_API Log::Kind stderr_threshold() const
Retrieve the stderr_threshold.
eprosima::fastdds::dds::StdoutErrConsumer::STDERR_THRESHOLD_DEFAULT
static constexpr Log::Kind STDERR_THRESHOLD_DEFAULT
Default value of stderr_threshold.
Definition
StdoutErrConsumer.hpp:59
eprosima::fastdds::dds::StdoutErrConsumer::~StdoutErrConsumer
virtual ~StdoutErrConsumer()=default
eprosima::fastdds::dds::StdoutErrConsumer::get_stream
virtual FASTDDS_EXPORTED_API std::ostream & get_stream(const Log::Entry &entry) override
eprosima::fastdds::dds::StdoutErrConsumer::stderr_threshold
virtual FASTDDS_EXPORTED_API void stderr_threshold(const Log::Kind &kind)
Set the stderr_threshold to a Log::Kind.
eprosima::fastdds::dds
Definition
BuiltinTopicKey.hpp:26
eprosima::fastdds
eprosima
eProsima namespace.
eprosima::fastdds::dds::Log::Entry
Definition
Log.hpp:174
include
fastdds
dds
log
StdoutErrConsumer.hpp
Generated on
for