class AWS::S3::Logging::Log::Line

Each line of a log exposes the raw line, but it also has method accessors for all the fields of the logged request.

The list of supported log line fields are listed in the S3 documentation: docs.amazonwebservices.com/AmazonS3/2006-03-01/LogFormat.html

line = log.lines.first
line.remote_ip
# => '72.21.206.5'

If a certain field does not apply to a given request (for example, the key field does not apply to a bucket request), or if it was unknown or unavailable, it will return nil.

line.operation
# => 'REST.GET.BUCKET'
line.key
# => nil