title: Rails formatting logs to use with aws-logs and CloudWatch
body: <p>AWS has this very cool log collection tool using <code>aws-logs</code></p>
  
  <p>However, I do not understand how I can format my log / configure the tool to be smarter and regroup the same error message. Right now AWS shows one message per line (because every line is timestamped)</p>
  
  <p><a href="https://i.stack.imgur.com/eg6cl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eg6cl.png" alt="enter image description here"></a></p>
  
  <p>My current log configuration indeed captures one new log entry per message. How can I go around it</p>
  
  <pre><code>[rails/production.log]
  file = /var/www/xxx/shared/log/production.log
  log_group_name = /rails/production.log
  log_stream_name = {instance_id}
  time_zone = LOCAL
  datetime_format = %Y-%m-%dT%H:%M:%S
  </code></pre>