library/src/main/java/com/kdgregory/aws/utils/cloudwatch/CloudWatchLogsWriter.java
/**
     *  Retrieves the current upload sequence token for the stream. If the
     *  stream does not exist, will attempt to re-create it.
     */
Retrieves the current upload sequence token for the stream. If the
stream does not exist, will attempt to re-create it.
Retrieves the current upload sequence token for the stream . If the stream does not exist will attempt to re - create it .
private String retrieveUploadSequenceToken()
    {
        LogStream stream = CloudWatchLogsUtil.describeLogStream(client, logGroupName, logStreamName);
        if (stream == null)
        {
            logger.debug("stream " + logGroupName + "/" + logStreamName + " does not exist, creating");
            stream = CloudWatchLogsUtil.createLogStream(client, logGroupName, logStreamName, 30000);
            if (stream == null)
            {
                logger.warn("stream " + logGroupName + "/" + logStreamName + " not ready after creation");
                return null;
            }
        }
        return stream.getUploadSequenceToken();
    }
private String retrieveUploadSequenceToken ( ) { LogStream stream = CloudWatchLogsUtil . describeLogStream ( client , logGroupName , logStreamName ) ; if ( stream == null ) { logger . debug ( "stream " + logGroupName + "/" + logStreamName + " does not exist, creating" ) ; stream = CloudWatchLogsUtil . createLogStream ( client , logGroupName , logStreamName , 30000 ) ; if ( stream == null ) { logger . warn ( "stream " + logGroupName + "/" + logStreamName + " not ready after creation" ) ; return null ; } } return stream . getUploadSequenceToken ( ) ; }
Retrieves the current upload sequence token for the stream.
Retrieves the current upload sequence token for the stream .