Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Aws::CloudWatchLogs::Utils::LogNode Class Reference

#include <log_node.h>

Inheritance diagram for Aws::CloudWatchLogs::Utils::LogNode:
Inheritance graph
[legend]

Classes

struct  Options
 

Public Member Functions

bool checkIfOnline (std_srvs::Trigger::Request &request, std_srvs::Trigger::Response &response)
 
void Initialize (const std::string &log_group, const std::string &log_stream, const Aws::Client::ClientConfiguration &config, Aws::SDKOptions &sdk_options, const Aws::CloudWatchLogs::CloudWatchOptions &cloudwatch_options, const std::shared_ptr< LogServiceFactory > &log_service_factory=std::make_shared< LogServiceFactory >())
 Reads creds, region, and SDK option to configure log manager. More...
 
 LogNode (const Options &options)
 
 LogNode (int8_t min_log_severity, std::unordered_set< std::string > ignore_nodes)
 
 LogNode (const LogNode &other)=delete
 
LogNodeoperator= (const LogNode &other)=delete
 
void RecordLogs (const rosgraph_msgs::Log::ConstPtr &log_msg)
 Emits RecordLog using the log manager. More...
 
bool shutdown () override
 
bool start () override
 
void TriggerLogPublisher (const ros::TimerEvent &)
 Trigger the log manager to call its Service function to publish logs to cloudwatch periodically. More...
 
 ~LogNode () override
 Tears down a AWSCloudWatchLogNode object. More...
 
- Public Member Functions inherited from Service
ServiceState getState ()
 
virtual std::string getStatusString ()
 
 Service ()
 
virtual ~Service ()=default
 

Private Member Functions

const std::string FormatLogs (const rosgraph_msgs::Log::ConstPtr &log_msg)
 
bool ShouldSendToCloudWatchLogs (const int8_t log_severity_level)
 

Private Attributes

std::unordered_set< std::string > ignore_nodes_
 
std::shared_ptr< Aws::CloudWatchLogs::LogServicelog_service_
 
int8_t min_log_severity_
 
bool publish_topic_names_
 

Additional Inherited Members

- Protected Member Functions inherited from Service
void setState (ServiceState new_state)
 

Detailed Description

Definition at line 33 of file log_node.h.

Constructor & Destructor Documentation

Aws::CloudWatchLogs::Utils::LogNode::LogNode ( const Options options)
explicit

Creates a new CloudWatchLogNode

Parameters
optionsan options struct that specifies some behaviors of this CloudWatchLogNode

Definition at line 36 of file log_node.cpp.

Aws::CloudWatchLogs::Utils::LogNode::LogNode ( int8_t  min_log_severity,
std::unordered_set< std::string >  ignore_nodes 
)
explicit
Deprecated:
Creates a new CloudWatchLogNode
Parameters
min_log_severitythe minimum log severity level defined in the configuration file logs with severity level equal or above get sent to CloudWatch Logs
ignore_nodesThe set of node names to ignore logs from

Definition at line 41 of file log_node.cpp.

Aws::CloudWatchLogs::Utils::LogNode::LogNode ( const LogNode other)
delete
Aws::CloudWatchLogs::Utils::LogNode::~LogNode ( )
override

Tears down a AWSCloudWatchLogNode object.

Definition at line 44 of file log_node.cpp.

Member Function Documentation

bool Aws::CloudWatchLogs::Utils::LogNode::checkIfOnline ( std_srvs::Trigger::Request &  request,
std_srvs::Trigger::Response &  response 
)

Return a Trigger response detailing the LogService online status.

Parameters
requestinput request
responseoutput response
Returns
true if the request was handled successfully, false otherwise

Definition at line 54 of file log_node.cpp.

const std::string Aws::CloudWatchLogs::Utils::LogNode::FormatLogs ( const rosgraph_msgs::Log::ConstPtr &  log_msg)
private

Definition at line 111 of file log_node.cpp.

void Aws::CloudWatchLogs::Utils::LogNode::Initialize ( const std::string &  log_group,
const std::string &  log_stream,
const Aws::Client::ClientConfiguration &  config,
Aws::SDKOptions &  sdk_options,
const Aws::CloudWatchLogs::CloudWatchOptions cloudwatch_options,
const std::shared_ptr< LogServiceFactory > &  log_service_factory = std::make_shared<LogServiceFactory>() 
)

Reads creds, region, and SDK option to configure log manager.

Parameters
log_grouplog group name
log_streamlog stream name
configaws client configuration object
sdk_optionsaws sdk options
log_service_factoryoptional log manager factory

Definition at line 46 of file log_node.cpp.

LogNode& Aws::CloudWatchLogs::Utils::LogNode::operator= ( const LogNode other)
delete
void Aws::CloudWatchLogs::Utils::LogNode::RecordLogs ( const rosgraph_msgs::Log::ConstPtr &  log_msg)

Emits RecordLog using the log manager.

Parameters
log_msgA log message from the subscribed topic(s)

Definition at line 87 of file log_node.cpp.

bool Aws::CloudWatchLogs::Utils::LogNode::ShouldSendToCloudWatchLogs ( const int8_t  log_severity_level)
private

Definition at line 106 of file log_node.cpp.

bool Aws::CloudWatchLogs::Utils::LogNode::shutdown ( )
overridevirtual

Reimplemented from Service.

Definition at line 79 of file log_node.cpp.

bool Aws::CloudWatchLogs::Utils::LogNode::start ( )
overridevirtual

Reimplemented from Service.

Definition at line 70 of file log_node.cpp.

void Aws::CloudWatchLogs::Utils::LogNode::TriggerLogPublisher ( const ros::TimerEvent )

Trigger the log manager to call its Service function to publish logs to cloudwatch periodically.

Parameters
timerA ros timer

Definition at line 102 of file log_node.cpp.

Member Data Documentation

std::unordered_set<std::string> Aws::CloudWatchLogs::Utils::LogNode::ignore_nodes_
private

Definition at line 122 of file log_node.h.

std::shared_ptr<Aws::CloudWatchLogs::LogService> Aws::CloudWatchLogs::Utils::LogNode::log_service_
private

Definition at line 120 of file log_node.h.

int8_t Aws::CloudWatchLogs::Utils::LogNode::min_log_severity_
private

Definition at line 121 of file log_node.h.

bool Aws::CloudWatchLogs::Utils::LogNode::publish_topic_names_
private

Definition at line 123 of file log_node.h.


The documentation for this class was generated from the following files:


cloudwatch_logger
Author(s): AWS RoboMaker
autogenerated on Sat Mar 6 2021 03:55:46