Main Page
Namespaces
Classes
Files
File List
File Members
cartographer_ros
ros_log_sink.h
Go to the documentation of this file.
1
/*
2
* Copyright 2016 The Cartographer Authors
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#ifndef CARTOGRAPHER_ROS_ROS_LOG_SINK_H_
18
#define CARTOGRAPHER_ROS_ROS_LOG_SINK_H_
19
20
#include <ctime>
21
22
#include "glog/logging.h"
23
24
namespace
cartographer_ros
{
25
26
// Makes Google logging use ROS logging for output while an instance of this
27
// class exists.
28
class
ScopedRosLogSink
:
public
::google::LogSink {
29
public
:
30
ScopedRosLogSink
();
31
~ScopedRosLogSink
()
override
;
32
33
void
send
(::google::LogSeverity severity,
const
char
*
filename
,
34
const
char
* base_filename,
int
line,
const
struct
std::tm* tm_time,
35
const
char
* message,
size_t
message_len)
override
;
36
37
void
WaitTillSent
()
override
;
38
39
private
:
40
bool
will_die_
;
41
};
42
43
}
// namespace cartographer_ros
44
45
#endif // CARTOGRAPHER_ROS_ROS_LOG_SINK_H_
filename
filename
cartographer_ros::ScopedRosLogSink::ScopedRosLogSink
ScopedRosLogSink()
Definition:
ros_log_sink.cc:38
cartographer_ros::ScopedRosLogSink
Definition:
ros_log_sink.h:28
cartographer_ros::ScopedRosLogSink::send
void send(::google::LogSeverity severity, const char *filename, const char *base_filename, int line, const struct std::tm *tm_time, const char *message, size_t message_len) override
Definition:
ros_log_sink.cc:41
cartographer_ros::ScopedRosLogSink::~ScopedRosLogSink
~ScopedRosLogSink() override
Definition:
ros_log_sink.cc:39
cartographer_ros::ScopedRosLogSink::will_die_
bool will_die_
Definition:
ros_log_sink.h:40
cartographer_ros::ScopedRosLogSink::WaitTillSent
void WaitTillSent() override
Definition:
ros_log_sink.cc:69
cartographer_ros
Definition:
assets_writer.cc:32
cartographer_ros
Author(s):
autogenerated on Mon Jun 10 2019 12:59:40