include
ROSLogHandler.h
Go to the documentation of this file.
1
//
3
// © Copyright 2022 SCHUNK Mobile Greifsysteme GmbH, Lauffen/Neckar Germany
4
// © Copyright 2022 FZI Forschungszentrum Informatik, Karlsruhe, Germany
5
//
6
// This file is part of the Schunk SVH Driver.
7
//
8
// The Schunk SVH Driver is free software: you can redistribute it and/or
9
// modify it under the terms of the GNU General Public License as published by
10
// the Free Software Foundation, either version 3 of the License, or (at your
11
// option) any later version.
12
//
13
// The Schunk SVH Driver is distributed in the hope that it will be useful,
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16
// Public License for more details.
17
//
18
// You should have received a copy of the GNU General Public License along with
19
// the Schunk SVH Driver. If not, see <https://www.gnu.org/licenses/>.
20
//
22
23
//----------------------------------------------------------------------
30
//----------------------------------------------------------------------
31
#pragma once
32
33
#include <string>
34
35
#include <
ros/ros.h
>
36
37
#include <
schunk_svh_library/LogHandler.h
>
38
#include <
schunk_svh_library/LogLevel.h
>
39
40
namespace
driver_svh
{
41
42
class
ROSLogHandler
:
public
LogHandler
43
{
44
public
:
45
ROSLogHandler
() =
default
;
46
virtual
~ROSLogHandler
()
override
=
default
;
47
virtual
void
log
(
const
std::string& file,
48
const
int
line,
49
const
std::string& name,
50
LogLevel
level,
51
const
std::string& msg)
override
;
52
53
private
:
54
static ::ros::console::Level
levelSVH2ROS
(
const
LogLevel
level);
55
};
56
57
void
setupROSLogHandler
(
LogLevel
level =
LogLevel::INFO
);
58
59
}
// namespace driver_svh
driver_svh::ROSLogHandler::~ROSLogHandler
virtual ~ROSLogHandler() override=default
driver_svh::ROSLogHandler::log
virtual void log(const std::string &file, const int line, const std::string &name, LogLevel level, const std::string &msg) override
Definition:
ROSLogHandler.cpp:44
ros.h
driver_svh::ROSLogHandler
Definition:
ROSLogHandler.h:42
driver_svh
driver_svh::LogHandler
LogHandler.h
driver_svh::ROSLogHandler::levelSVH2ROS
::ros::console::Level levelSVH2ROS(const LogLevel level)
Definition:
ROSLogHandler.cpp:64
driver_svh::LogLevel::INFO
@ INFO
LogLevel.h
driver_svh::setupROSLogHandler
void setupROSLogHandler(LogLevel level=LogLevel::INFO)
Definition:
ROSLogHandler.cpp:83
driver_svh::ROSLogHandler::ROSLogHandler
ROSLogHandler()=default
driver_svh::LogLevel
LogLevel
schunk_svh_driver
Author(s): Georg Heppner
, Felix Exner
, Pascal Becker
, Johannes Mangler
autogenerated on Sat Apr 15 2023 02:24:55