Skip to main content

Pipeline logs

Layer stores and provides access to logs generated by your code to help you understand and troubleshoot your pipeline builds. You can also share them to help Layer engineers or the community figure out what went wrong if you have reported a bug or other issue.

This page shows you how to access your user logs. For more technical information, refer to layer logs in CLI commands.

Prerequisites

View logs in the terminal

View logs for a particular pipeline run in your terminal.

  1. Get the pipeline run ID. It is printed when your run layer start or layer runs.
  2. In your terminal, enter one of the following CLI commands.

To get all logs produced thus far (if the run is completed, it will be all of them):

layer logs PIPELINE_RUN_ID

To get all logs produced thus far and and keep checking for new logs:

layer logs --follow PIPELINE_RUN_ID
note

The --follow option will not allow further input in the terminal until the run is complete.

Write logs to a file

Write logs for a particular pipeline run to a file.

  1. Get the pipeline run ID. It is printed when your run layer start or layer runs.
  2. In your terminal, enter one of the following CLI commands, including the name of the log file that you want saved.

To get all logs produced thus far (if the run is completed, it will be all of them):

layer logs PIPELINE_RUN_ID > NAME_OF_YOUR_LOG_FILE

To get all logs produced thus far and and keep checking for new logs:

layer logs --follow PIPELINE_RUN_ID > NAME_OF_YOUR_LOG_FILE
note

The follow option will not allow further input in the terminal until the run is complete.