dlog.cpp
Go to the documentation of this file.
1 /*
2  * Software License Agreement (Apache License)
3  *
4  * Copyright (c) 2018 Plus One Robotics
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #include <stdarg.h>
20 #include <stdio.h>
21 #include "packml_sm/dlog.h"
23 #include "ros/console.h"
24 
25 namespace packml_sm
26 {
27 void DLog::LogInfo(const char* format, ...)
28 {
29  char buffer[0x1FF];
30  va_list ap;
31  va_start(ap, format);
32  vsprintf(buffer, format, ap);
33  ROS_INFO("%s", buffer);
34  va_end(ap);
35 }
36 
37 void DLog::LogError(const char* format, ...)
38 {
39  char buffer[0x1FF];
40  va_list ap;
41  va_start(ap, format);
42  vsprintf(buffer, format, ap);
43  ROS_ERROR("%s", buffer);
44  va_end(ap);
45 }
46 
47 void DLog::LogWarning(const char* format, ...)
48 {
49  char buffer[0x1FF];
50  va_list ap;
51  va_start(ap, format);
52  vsprintf(buffer, format, ap);
53  ROS_WARN("%s", buffer);
54  va_end(ap);
55 }
56 
57 void DLog::LogDebug(const char* format, ...)
58 {
59  char buffer[0x1FF];
60  va_list ap;
61  va_start(ap, format);
62  vsprintf(buffer, format, ap);
63  ROS_DEBUG("%s", buffer);
64  va_end(ap);
65 }
66 }
static void LogDebug(const char *format,...)
Definition: dlog.cpp:57
#define ROS_WARN(...)
static void LogInfo(const char *format,...)
Definition: dlog.cpp:27
#define ROS_INFO(...)
static void LogWarning(const char *format,...)
Definition: dlog.cpp:47
#define ROS_ERROR(...)
static void LogError(const char *format,...)
Definition: dlog.cpp:37
#define ROS_DEBUG(...)


packml_sm
Author(s): Shaun Edwards
autogenerated on Fri Jul 12 2019 03:30:55