public class RetrieveCloudWatchLogs extends Object
Constructor and Description |
---|
RetrieveCloudWatchLogs(com.amazonaws.auth.AWSCredentials awsCredentials,
String reg) |
Modifier and Type | Method and Description |
---|---|
List<com.amazonaws.services.logs.model.OutputLogEvent> |
getAllLogs()
Generates all Logs
|
com.amazonaws.services.logs.AWSLogs |
getAwsLogClient()
Client for accessing Amazon CloudWatch Logs.
|
com.amazonaws.auth.AWSCredentials |
getCredentials()
Credentials required to init a
AWSLogsClient |
List<com.amazonaws.services.logs.model.OutputLogEvent> |
getLogsFromLogGroup(String logGroupName)
Generates Logs from a specified LogGroup
|
List<com.amazonaws.services.logs.model.OutputLogEvent> |
getLogsFromLogGroupNamePrefix(String logGroupNamePrefix)
Generates Logs from a LogGroups containing the LogGroupNamePrefix
|
List<com.amazonaws.services.logs.model.OutputLogEvent> |
getLogsFromLogStream(String logGroupName,
String logStreamName)
Generates Logs from a specified LogStream of specified LogGroup
|
List<com.amazonaws.services.logs.model.OutputLogEvent> |
getLogsFromLogStreamNamePrefixOfAllLogGroup(String logStreamNamePrefix)
Generates Logs from a specified LogStream of all LogGroups
|
List<com.amazonaws.services.logs.model.OutputLogEvent> |
getLogsFromLogStreamOfAllLogGroups(String logStreamName)
Generates Logs from a specified LogStream of all LogGroups
|
List<com.amazonaws.services.logs.model.OutputLogEvent> |
getLogsFromLogStreamPrefix(String logGroupName,
String logStreamNamePrefix)
Generates Logs from LogStream containing the logStream Prefix of specified LogGroup
|
com.amazonaws.regions.Regions |
getRegion()
Enumeration of region names
|
void |
init() |
void |
setAwsLogClient(com.amazonaws.services.logs.AWSLogs awsLogClient)
Client for accessing Amazon CloudWatch Logs.
|
void |
setCredentials(com.amazonaws.auth.AWSCredentials credentials)
Credentials required to init a
AWSLogsClient |
void |
setRegion(com.amazonaws.regions.Regions region)
Enumeration of region names
|
void |
shutdown()
Shuts down the Logs client object, releasing any resources that might be held open.
|
public RetrieveCloudWatchLogs(com.amazonaws.auth.AWSCredentials awsCredentials, String reg)
@PostConstruct public void init()
public List<com.amazonaws.services.logs.model.OutputLogEvent> getLogsFromLogStream(String logGroupName, String logStreamName) throws com.amazonaws.services.logs.model.ResourceNotFoundException
logGroupName
- : Log Group to generate delivery reports fromlogStreamName
- : Log Stream to generate delivery reports fromcom.amazonaws.services.logs.model.ResourceNotFoundException
- : When no logs found for LogGroup
and logStreamNameLogGroup
,
LogStream
public List<com.amazonaws.services.logs.model.OutputLogEvent> getLogsFromLogStreamPrefix(String logGroupName, String logStreamNamePrefix) throws com.amazonaws.services.logs.model.ResourceNotFoundException
logGroupName
- : Log Group to generate delivery reports fromlogStreamNamePrefix
- : Log Stream containing the logStreamNamePrefix to generate delivery reports fromcom.amazonaws.services.logs.model.ResourceNotFoundException
LogGroup
,
LogStream
public List<com.amazonaws.services.logs.model.OutputLogEvent> getLogsFromLogStreamOfAllLogGroups(String logStreamName) throws com.amazonaws.services.logs.model.ResourceNotFoundException
logStreamName
- : Log Stream to generate delivery reports fromcom.amazonaws.services.logs.model.ResourceNotFoundException
LogStream
public List<com.amazonaws.services.logs.model.OutputLogEvent> getLogsFromLogStreamNamePrefixOfAllLogGroup(String logStreamNamePrefix) throws com.amazonaws.services.logs.model.ResourceNotFoundException
logStreamName
- : Log Stream to generate delivery reports fromcom.amazonaws.services.logs.model.ResourceNotFoundException
LogStream
public List<com.amazonaws.services.logs.model.OutputLogEvent> getLogsFromLogGroup(String logGroupName)
logGroupName
- : Log Group to generate delivery reports fromLogGroup
public List<com.amazonaws.services.logs.model.OutputLogEvent> getLogsFromLogGroupNamePrefix(String logGroupNamePrefix)
logGroupNamePrefix
- : Log Group Name prefix to match to generate delivery reports fromLogGroup
public List<com.amazonaws.services.logs.model.OutputLogEvent> getAllLogs()
public void shutdown()
AmazonWebServiceClient.shutdown()
public com.amazonaws.regions.Regions getRegion()
public void setRegion(com.amazonaws.regions.Regions region)
public com.amazonaws.services.logs.AWSLogs getAwsLogClient()
public void setAwsLogClient(com.amazonaws.services.logs.AWSLogs awsLogClient)
public com.amazonaws.auth.AWSCredentials getCredentials()
AWSLogsClient
public void setCredentials(com.amazonaws.auth.AWSCredentials credentials)
AWSLogsClient
Copyright © 2018. All rights reserved.