platforms / aws-elastic-beanstalk / configuration / sending-multiple-log-files

Sending Multiple Log Files From AWS Elastic Beanstalk

Depending on your Elastic Beanstalk stack, you'll want to track different log files. As a general rule, we do not recommend sending every log file to Timber as it can be noisy and unhelpful. Below is a list of common log files that are tracked in an Elastic Beanstalk environment.

How to

At the top of the Timber ebextensions file you'll notice a /etc/timber.toml entry. Simply modify the contents of this file to track your selected log files:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# .ebextensions/01_timber_install.config
---
files:
  "/etc/timber.toml":
    mode: "000640"
    owner: root
    group: root
    encoding: plain
    content: |
      [[files]]
      path = "/var/log/new-log1.log"

+     [[files]]
+     path = "/var/log/new-log2.log" # <---- REPLACE WITH YOUR LOG FILE PATH

      # Add as many as you see fit.
# ...

Common Log File Paths

Please refer to the AWS docs on Elastic Beanstalk log locations for a comprehensive guide and list. If you are unsure, it is recommended that you SSH onto the server to locate the actual paths of your log files.

  1. Apache HTTP Access Log - /var/log/httpd/access_log
  2. Apache HTTP Error Log - /var/log/httpd/error_log
  3. Nginx Access Log - /var/log/nginx/access.log
  4. Nginx Error Log - /var/log/nginx/error.log
  5. Nodejs - /var/log/nodejs/nodejs.log
  6. Passenger - /var/app/support/logs/passenger.log
  7. Rails - /var/app/support/logs/production.log
Questions?

Chat with us, just click the talk button in the bottom right of this page.

Chat with us
Sign Up

Log better and solve problems faster, today. Install in under a minute.

Sign Up