Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable setting log levels in DDS implementation #124

Merged
merged 9 commits into from
Jan 18, 2018
5 changes: 5 additions & 0 deletions rmw/include/rmw/rmw.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,11 @@ rmw_service_server_is_available(
const rmw_client_t * client,
bool * is_available);

RMW_PUBLIC
RMW_WARN_UNUSED
rmw_ret_t
rmw_set_log_severity(rmw_log_severity_t severity);

#if __cplusplus
}
#endif
Expand Down
13 changes: 13 additions & 0 deletions rmw/include/rmw/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ extern "C"
#include <stddef.h>
#include <stdint.h>

// map rcutils specific log levels to rmw speicfic type
#include <rcutils/logging.h>
#include "rmw/visibility_control.h"

typedef int rmw_ret_t;
Expand Down Expand Up @@ -228,6 +230,17 @@ typedef struct RMW_PUBLIC_TYPE rmw_message_info_t

enum {RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT = 0};

// Type mapping of rcutil log severity types to
// rmw specific types.
typedef enum RWM_PUBLIC_TYPE
{
RMW_LOG_SEVERITY_DEBUG = RCUTILS_LOG_SEVERITY_DEBUG,
RMW_LOG_SEVERITY_INFO = RCUTILS_LOG_SEVERITY_INFO,
RMW_LOG_SEVERITY_WARN = RCUTILS_LOG_SEVERITY_WARN,
RMW_LOG_SEVERITY_ERROR = RCUTILS_LOG_SEVERITY_ERROR,
RMW_LOG_SEVERITY_FATAL = RCUTILS_LOG_SEVERITY_FATAL
} rmw_log_severity_t;

#if __cplusplus
}
#endif
Expand Down