Program Listing for File rcl_logging_interface.h

Return to documentation for file (include/rcl_logging_interface/rcl_logging_interface.h)

// Copyright 2020 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef RCL_LOGGING_INTERFACE__RCL_LOGGING_INTERFACE_H_
#define RCL_LOGGING_INTERFACE__RCL_LOGGING_INTERFACE_H_

#include "rcl_logging_interface/visibility_control.h"
#include "rcutils/allocator.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef enum
{
  RCL_LOGGING_RET_OK = 0,
  RCL_LOGGING_RET_ERROR = 2,
  RCL_LOGGING_RET_INVALID_ARGUMENT = 11,
  RCL_LOGGING_RET_CONFIG_FILE_DOESNT_EXIST = 21,
  RCL_LOGGING_RET_CONFIG_FILE_INVALID = 22,
} rcl_logging_ret_t;


RCL_LOGGING_INTERFACE_PUBLIC
RCUTILS_WARN_UNUSED
rcl_logging_ret_t
rcl_logging_external_initialize(const char * config_file, rcutils_allocator_t allocator);


RCL_LOGGING_INTERFACE_PUBLIC
RCUTILS_WARN_UNUSED
rcl_logging_ret_t
rcl_logging_external_shutdown();


RCL_LOGGING_INTERFACE_PUBLIC
void
rcl_logging_external_log(int severity, const char * name, const char * msg);


RCL_LOGGING_INTERFACE_PUBLIC
RCUTILS_WARN_UNUSED
rcl_logging_ret_t rcl_logging_external_set_logger_level(const char * name, int level);


RCL_LOGGING_INTERFACE_PUBLIC
rcl_logging_ret_t
rcl_logging_get_logging_directory(rcutils_allocator_t allocator, char ** directory);

#ifdef __cplusplus
}
#endif

#endif  // RCL_LOGGING_INTERFACE__RCL_LOGGING_INTERFACE_H_