docs: function S3StreamLogger(options){
      stream.Writable.call(this, options);
  
      if(!(options.bucket || process.env.BUCKET_NAME))
          throw new Error("options.bucket or BUCKET_NAME environment variable is required");
  
      this.bucket                 = options.bucket || process.env.BUCKET_NAME;
      this.folder                 = options.folder || '';
      this.tags                   = options.tags || {};                  // no tags are assigned by default
      this.name_format            = options.name_format;
      this.rotate_every           = options.rotate_every  || 60*60*1000; // default to 60 minutes
      this.max_file_size          = options.max_file_size || 200000;     // or 200k, whichever is sooner
      this.upload_every           = options.upload_every  || 20*1000;    // default to 20 seconds
      this.buffer_size            = options.buffer_size   || 10000;      // or every 10k, which ever is sooner
      this.server_side_encryption = options.server_side_encryption || false;
      this.acl                    = options.acl || false;
      this.compress               = options.compress || false;
  
      // Backwards compatible API changes
  
      options.config = options.config || {};
      if(options.access_key_id) {
        options.config.accessKeyId = options.access_key_id;
      }
      if(options.secret_access_key) {
        options.config.secretAccessKey = options.secret_access_key;
      }
      if(options.config.sslEnabled === undefined) {
        options.config.sslEnabled = true;
      }
      if(options.region) {
        options.config.region = options.region;
      }
      if(!options.name_format) {
          // Get branch and host name for default file name
          var _current_branch;
          try {
              _current_branch = branch.sync();
          } catch (e) {
              _current_branch = 'unknown'
          }
          var _extension = '.log';
          if(this.compress){
              _extension += '.gz';
          }
          this.name_format = `%Y-%m-%d-%H-%M-%S-%L-${_current_branch}-${os.hostname()}${_extension}`;
      }
  
      this.s3           = new aws.S3(options.config);
      this.timeout      = null;
      this.object_name  = null;
      this.file_started = null;
      this.last_write   = null;
      this.buffers      = [];
      this.unwritten    = 0;
  
      this._newFile();
  }