library/src/main/java/com/kdgregory/aws/utils/cloudwatch/CloudWatchLogsUtil.java
/**
     *  Creates a log stream, waiting until it is describable, a timeout elapses, or the
     *  thread is interrupted. Also creates the specified log group if it does not exist.
     *  No-op if the stream exists at time of call.
     *
     *  @param  client          The service client.
     *  @param  groupName       The name of the group containing the stream.
     *  @param  streamName      The name of the stream.
     *  @param  timeout         Milliseconds to wait for created resources to be available.
     *                          Note that the same timeout is applied to group and stream,
     *                          so effective timeout is double the passed value.
     *
     *  @return A retrieved <code>LogStream</code> object if the stream was successfully created
     *          or already exists, <code>null</code> if the timeout expired or the thread was
     *          interrupted before stream was verified.
     */
Creates a log stream, waiting until it is describable, a timeout elapses, or the
thread is interrupted. Also creates the specified log group if it does not exist.
No-op if the stream exists at time of call.

@param  client          The service client.
@param  groupName       The name of the group containing the stream.
@param  streamName      The name of the stream.
@param  timeout         Milliseconds to wait for created resources to be available.
Note that the same timeout is applied to group and stream,
so effective timeout is double the passed value.

@return A retrieved LogStream object if the stream was successfully created
or already exists, null if the timeout expired or the thread was
interrupted before stream was verified.
Creates a log stream waiting until it is describable a timeout elapses or the thread is interrupted . Also creates the specified log group if it does not exist . No - op if the stream exists at time of call . @param client The service client . @param groupName The name of the group containing the stream . @param streamName The name of the stream . @param timeout Milliseconds to wait for created resources to be available . Note that the same timeout is applied to group and stream so effective timeout is double the passed value . @return A retrieved LogStream object if the stream was successfully created or already exists null if the timeout expired or the thread was interrupted before stream was verified .
public static LogStream createLogStream(AWSLogs client, String groupName, String streamName, long timeout)
    {
        logger.debug("creating CloudWatch log stream: " + groupName + "/" + streamName);
        LogGroup group = describeLogGroup(client, groupName);
        if (group == null)
        {
            createLogGroup(client, groupName, timeout);
        }
        try
        {
            CreateLogStreamRequest request = new CreateLogStreamRequest()
                                             .withLogGroupName(groupName)
                                             .withLogStreamName(streamName);
            client.createLogStream(request);
        }
        catch (ResourceAlreadyExistsException ex)
        {
        }
        return waitUntilCreated(client, groupName, streamName, timeout, RESOURCE_TRANSITION_DESCRIBE_INTERVAL);
    }
public static LogStream createLogStream ( AWSLogs client , String groupName , String streamName , long timeout ) { logger . debug ( "creating CloudWatch log stream: " + groupName + "/" + streamName ) ; LogGroup group = describeLogGroup ( client , groupName ) ; if ( group == null ) { createLogGroup ( client , groupName , timeout ) ; } try { CreateLogStreamRequest request = new CreateLogStreamRequest ( ) . withLogGroupName ( groupName ) . withLogStreamName ( streamName ) ; client . createLogStream ( request ) ; } catch ( ResourceAlreadyExistsException ex ) { } return waitUntilCreated ( client , groupName , streamName , timeout , RESOURCE_TRANSITION_DESCRIBE_INTERVAL ) ; }
Creates a log stream, waiting until it is describable, a timeout elapses, or the
  thread is interrupted.
Creates a log stream waiting until it is describable a timeout elapses or the thread is interrupted .
// fall through so that we can retrieve group name