Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef CARTOGRAPHER_ROS_CARTOGRAPHER_ROS_ROS_LOG_SINK_H
00018 #define CARTOGRAPHER_ROS_CARTOGRAPHER_ROS_ROS_LOG_SINK_H
00019
00020 #include <ctime>
00021
00022 #include "glog/logging.h"
00023
00024 namespace cartographer_ros {
00025
00026
00027
00028 class ScopedRosLogSink : public ::google::LogSink {
00029 public:
00030 ScopedRosLogSink();
00031 ~ScopedRosLogSink() override;
00032
00033 void send(::google::LogSeverity severity, const char* filename,
00034 const char* base_filename, int line, const struct std::tm* tm_time,
00035 const char* message, size_t message_len) override;
00036
00037 void WaitTillSent() override;
00038
00039 private:
00040 bool will_die_;
00041 };
00042
00043 }
00044
00045 #endif // CARTOGRAPHER_ROS_CARTOGRAPHER_ROS_ROS_LOG_SINK_H