Menu
AWS Elastic Beanstalk
Developer Guide (API Version 2010-12-01)

eb logs

Description

Returns logs for the specified or default environment. Relevant logs vary by container type.

If the root directory contains a platform.yaml file specifying a custom platform, this command also returns logs for the builder environment.

Syntax

eb logs

eb logs environment_name

Options

Name

Description

-a

or

--all

Retrieves all logs and saves them to the .elasticbeanstalk/logs directory.

-cw [enable | disable]

or

--cloudwatch [enable | disable]

Enables or disables CloudWatch Logs. If no argument is supplied, the logs are enabled.

-g log-group

or

--log-group log-group

Specifies the location where Elastic Beanstalk stores CloudWatch Logs. CloudWatch Logs must be enabled for this option to take effect.

If you enable CloudWatch Logs, but do not specify a location, the default location is /aws/elasticbeanstalk/env-name/var/log/eb-activity.log.

Elastic Beanstalk emits an error if the location does not exist.

--instance instance-id

Retrieve logs for the specified instance only.

--stream

Stream deployment logs that were set up with CloudWatch.

--zip

Retrieves all logs, compresses them into a .zip file, and then saves the file to the .elasticbeanstalk/logs directory.

Common options

 

Output

Shows the logs directly in the terminal by default (press q to close). --all and --zip options save the logs locally and output the location of the file(s).

Example

$ eb logs --zip
Retrieving logs...
Logs were saved to /home/workspace/environment/.elasticbeanstalk/logs/150622_173444.zip