rcl_logging_spdlog  master
Implementation of rcl_logging API for an spdlog backend.
All Files Functions Enumerations Enumerator Macros Pages
rcl_logging_interface.h
Go to the documentation of this file.
1 // Copyright 2020 Open Source Robotics Foundation, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef RCL_LOGGING_INTERFACE__RCL_LOGGING_INTERFACE_H_
16 #define RCL_LOGGING_INTERFACE__RCL_LOGGING_INTERFACE_H_
17 
19 #include "rcutils/allocator.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 typedef enum
26 {
33 
35 
51 RCUTILS_WARN_UNUSED
53 rcl_logging_external_initialize(const char * config_file, rcutils_allocator_t allocator);
54 
56 
63 RCUTILS_WARN_UNUSED
66 
68 
76 void
77 rcl_logging_external_log(int severity, const char * name, const char * msg);
78 
80 
92 RCUTILS_WARN_UNUSED
93 rcl_logging_ret_t rcl_logging_external_set_logger_level(const char * name, int level);
94 
96 
117 rcl_logging_get_logging_directory(rcutils_allocator_t allocator, char ** directory);
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #endif // RCL_LOGGING_INTERFACE__RCL_LOGGING_INTERFACE_H_
rcl_logging_external_log
RCL_LOGGING_INTERFACE_PUBLIC void rcl_logging_external_log(int severity, const char *name, const char *msg)
Log a message.
RCL_LOGGING_RET_INVALID_ARGUMENT
@ RCL_LOGGING_RET_INVALID_ARGUMENT
Definition: rcl_logging_interface.h:29
RCL_LOGGING_RET_ERROR
@ RCL_LOGGING_RET_ERROR
Definition: rcl_logging_interface.h:28
rcl_logging_external_initialize
RCL_LOGGING_INTERFACE_PUBLIC RCUTILS_WARN_UNUSED rcl_logging_ret_t rcl_logging_external_initialize(const char *config_file, rcutils_allocator_t allocator)
Initialize the external logging library.
rcl_logging_get_logging_directory
RCL_LOGGING_INTERFACE_PUBLIC rcl_logging_ret_t rcl_logging_get_logging_directory(rcutils_allocator_t allocator, char **directory)
Get the logging directory.
RCL_LOGGING_INTERFACE_PUBLIC
#define RCL_LOGGING_INTERFACE_PUBLIC
Definition: visibility_control.h:47
RCL_LOGGING_RET_OK
@ RCL_LOGGING_RET_OK
Definition: rcl_logging_interface.h:27
visibility_control.h
rcl_logging_external_set_logger_level
RCL_LOGGING_INTERFACE_PUBLIC RCUTILS_WARN_UNUSED rcl_logging_ret_t rcl_logging_external_set_logger_level(const char *name, int level)
Set the severity level for a logger.
RCL_LOGGING_RET_CONFIG_FILE_INVALID
@ RCL_LOGGING_RET_CONFIG_FILE_INVALID
Definition: rcl_logging_interface.h:31
RCL_LOGGING_RET_CONFIG_FILE_DOESNT_EXIST
@ RCL_LOGGING_RET_CONFIG_FILE_DOESNT_EXIST
Definition: rcl_logging_interface.h:30
rcl_logging_ret_t
rcl_logging_ret_t
Definition: rcl_logging_interface.h:25
rcl_logging_external_shutdown
RCL_LOGGING_INTERFACE_PUBLIC RCUTILS_WARN_UNUSED rcl_logging_ret_t rcl_logging_external_shutdown()
Free the resources allocated for the external logging system.