Public Member Functions | List of all members
Aws::CloudWatchLogs::LogService Class Reference

#include <log_service.h>

Inheritance diagram for Aws::CloudWatchLogs::LogService:
Inheritance graph
[legend]

Public Member Functions

Aws::CloudWatchLogs::Model::InputLogEvent convertInputToBatched (const std::string &input, const std::chrono::milliseconds &milliseconds) override
 
Aws::CloudWatchLogs::Model::InputLogEvent convertInputToBatched (const std::string &input) override
 
 LogService (std::shared_ptr< Publisher< LogCollection >> log_publisher, std::shared_ptr< DataBatcher< LogType >> log_batcher, std::shared_ptr< Aws::FileManagement::FileUploadStreamer< LogCollection >> log_file_upload_streamer=nullptr)
 
- Public Member Functions inherited from Aws::CloudWatch::CloudWatchService< std::string, LogType >
virtual bool batchData (const D &data_to_batch)
 
virtual bool batchData (const D &data_to_batch, const std::chrono::milliseconds &milliseconds)
 
 CloudWatchService (std::shared_ptr< Publisher< std::list< T >>> publisher, std::shared_ptr< DataBatcher< T >> batcher)
 
virtual std::chrono::milliseconds getCurrentTimestamp ()
 
virtual std::chrono::milliseconds getDequeueDuration ()
 
int getNumberDequeued ()
 
virtual bool isConnected ()
 
virtual bool publishBatchedData ()
 
virtual bool setDequeueDuration (std::chrono::milliseconds new_value)
 
virtual bool shutdown ()
 
virtual bool start () override
 
 ~CloudWatchService ()=default
 
- Public Member Functions inherited from InputStage< TaskPtr< std::list< T > > >
std::shared_ptr< Source< TaskPtr< std::list< T > > > > getSource ()
 
void setSource (std::shared_ptr< Source< TaskPtr< std::list< T > > >> source)
 
- Public Member Functions inherited from RunnableService
std::string getStatusString () override
 
virtual bool isRunning ()
 
void join ()
 
 RunnableService ()
 
void waitForShutdown (std::chrono::milliseconds millis)
 
void waitForShutdown ()
 
 ~RunnableService () override=default
 
- Public Member Functions inherited from Service
ServiceState getState ()
 
 Service ()
 
virtual ~Service ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from Aws::CloudWatch::CloudWatchService< std::string, LogType >
virtual T convertInputToBatched (const D &input, const std::chrono::milliseconds &milliseconds)=0
 
virtual T convertInputToBatched (const D &input)=0
 
void work ()
 
- Protected Member Functions inherited from RunnableService
virtual void run ()
 
virtual bool startWorkerThread ()
 
virtual bool stopWorkerThread ()
 
- Protected Member Functions inherited from Service
void setState (ServiceState new_state)
 
- Protected Attributes inherited from Aws::CloudWatch::CloudWatchService< std::string, LogType >
std::shared_ptr< DataBatcher< T > > batcher_
 
std::chrono::milliseconds dequeue_duration_
 
std::shared_ptr< FileUploadStreamer< std::list< T > > > file_upload_streamer_
 
std::shared_ptr< Publisher< std::list< T > > > publisher_
 

Detailed Description

Implementation to send logs to Cloudwatch. Note: though the batcher and publisher are required, the file streamer is not. If the file streamer is not provided then log data is dropped if any failure is observed during the attempt to publish.

Definition at line 45 of file log_service.h.

Constructor & Destructor Documentation

Aws::CloudWatchLogs::LogService::LogService ( std::shared_ptr< Publisher< LogCollection >>  log_publisher,
std::shared_ptr< DataBatcher< LogType >>  log_batcher,
std::shared_ptr< Aws::FileManagement::FileUploadStreamer< LogCollection >>  log_file_upload_streamer = nullptr 
)
inline

Construct a new instance of LogService.

Parameters
publisherused to publish logs to CloudWatch
batcherused to batch / queue logs before publishing
file_upload_streamerused to save logs data and upload later in the event of network connectivity changes

Definition at line 55 of file log_service.h.

Member Function Documentation

Aws::CloudWatchLogs::Model::InputLogEvent Aws::CloudWatchLogs::LogService::convertInputToBatched ( const std::string &  input,
const std::chrono::milliseconds &  milliseconds 
)
inlineoverride

Convert an input string and timestamp to a log event.

Parameters
inputstring input to be sent as a log
millisecondstimestamp of the log event
Returns
the AWS SDK log object to be send to CloudWatch

Definition at line 70 of file log_service.h.

Aws::CloudWatchLogs::Model::InputLogEvent Aws::CloudWatchLogs::LogService::convertInputToBatched ( const std::string &  input)
inlineoverride

Convert an input string to a log event. The current system time is used as the log event timestamp.

Parameters
inputstring input to be sent as a log
Returns
the AWS SDK log object to be send to CloudWatch

Definition at line 88 of file log_service.h.


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


cloudwatch_logs_common
Author(s): AWS RoboMaker
autogenerated on Fri May 7 2021 02:18:24