aws_ros_logger.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
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  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
17 #include <ros/ros.h>
18 
19 
20 namespace Aws {
21 namespace Utils {
22 namespace Logging {
23 
24 AWSROSLogger::AWSROSLogger(Aws::Utils::Logging::LogLevel log_level) : AWSLogSystem(log_level) {}
25 
26 void AWSROSLogger::LogTrace(const char * tag, const std::string & message)
27 {
28  ROS_DEBUG("[%s] %s", tag, message.c_str());
29 }
30 
31 void AWSROSLogger::LogInfo(const char * tag, const std::string & message)
32 {
33  ROS_INFO("[%s] %s", tag, message.c_str());
34 }
35 
36 void AWSROSLogger::LogDebug(const char * tag, const std::string & message)
37 {
38  ROS_DEBUG("[%s] %s", tag, message.c_str());
39 }
40 
41 void AWSROSLogger::LogWarn(const char * tag, const std::string & message)
42 {
43  ROS_WARN("[%s] %s", tag, message.c_str());
44 }
45 
46 void AWSROSLogger::LogError(const char * tag, const std::string & message)
47 {
48  ROS_ERROR("[%s] %s", tag, message.c_str());
49 }
50 
51 void AWSROSLogger::LogFatal(const char * tag, const std::string & message)
52 {
53  ROS_FATAL("[%s] %s", tag, message.c_str());
54 }
55 
56 } // namespace Logging
57 } // namespace Utils
58 } // namespace Aws
#define ROS_FATAL(...)
void LogDebug(const char *tag, const std::string &message) override
void LogWarn(const char *tag, const std::string &message) override
void LogFatal(const char *tag, const std::string &message) override
#define ROS_WARN(...)
void LogTrace(const char *tag, const std::string &message) override
#define ROS_INFO(...)
void LogError(const char *tag, const std::string &message) override
void LogInfo(const char *tag, const std::string &message) override
AWSROSLogger(Aws::Utils::Logging::LogLevel log_level=LogLevel::Trace)
#define ROS_ERROR(...)
#define ROS_DEBUG(...)


aws_ros1_common
Author(s): AWS RoboMaker
autogenerated on Thu Mar 4 2021 03:25:44