# Build logs

Abstract

On Bitrise, build logs are easily accessible: they can be viewed on the website in their entirety or they can be downloaded to view them on your own device.

Build logs allow users to analyze their builds and find out what went wrong - and what went right! On Bitrise, build logs are easily accessible: they can be viewed on the website in their entirety or they can be downloaded to view them on your own device.

### Build retention for 200 days

On the Builds page of your app, we only show builds from the last 200 days. The same limit applies if you are searching for specific builds on the page. This limitation also applies to most API calls: the GET/apps/{app-slug}/builds endpoint and related endpoints can only return builds from the last 200 days.

However, there are two methods to get a build that is older than 200 days:

## Finding a build log

When you run a build, a build log is generated automatically. Every build has its own log, with its own unique build log URL. The build log URL contains the build slug: a hexadecimal identifier for a specific build.

### Assisting Bitrise Support

When Bitrise Support asks for your build logs, the best thing to do is send the build URL.

1. Find your app on the Dashboard, and select it.

2. On the app's main page, select the build you want to check out.

3. Make sure you have the Log tab selected.

### Opening the full log

If you have a longer build log then by default, only the end of the log is displayed. Click the bar on the top of the log to expand.

## Contents of a build log

All Bitrise build logs have the same basic structure. When opening a full log, under the Bitrise logo you will find:

• The version of the Bitrise CLI that ran the build.

• The name of the workflow that was run (for example, primary).

Below this basic information, you will see every Step that was ran as part of the build. For each Step, Bitrise displays:

• The name and version of the Step.

• The running time of the Step.

• A printout of the Step’s commands and their results, including highlighted error messages.

• Whether the Step passed or failed.

Check your build log carefully when a build fails. Error messages are usually highlighted in red on Bitrise. For failed Steps, an exit code is displayed next to their names. This can tell you more about why the particular Step failed.

## Following a build log live

You can check the log of a build live - that is, while the build is running. What’s more, you can even follow the log as the build is happening. That means that as the build progresses, the log will automatically scroll to the new sections as they appear.

To do so:

1. Start a build.

2. Go to the build’s page.

3. Scroll down to the log.

4. Click Follow.

To stop following, you just need to manually navigate anywhere within the log. You can restart following any time.

## Build log limitations

Bitrise can process a build log up to 32MB.

If your build log exceeds this limit, only the beginning and the end of your build log gets printed out at the end of the completed run while the middle section is cut out on the UI and in downloaded build logs too. The following messages indicates where the log got stripped:

 --- !!! --- LOG TOO LONG, middle was removed --- !!! ---


Even if your log is smaller than the 32MB limit (but bigger than 16MB) it might get stripped from the middle. When you have a very long running build (around 3 hours) with a log within this size interval, it will get stripped in the middle.

If you think your build log might exceed this limit, you can consider shortening it by, for example, switching off verbose logging.

If you need to send your build logs to people who do not have access to the app on Bitrise, or you want to store your logs in your own archives, you can simply download the log file from Bitrise.

### Log security

Please note that your build log can contain sensitive information! Make sure to check its contents before downloading the log file and sending it out to anyone. We recommend using Secrets to make sure nothing sensitive appears in build logs.

1. Find your app on the Dashboard, and select it.

2. On the app's main page, select the build you want to check out.

3. Open the dropdown menu and click the button.

## Deleting a build log

If necessary, you can delete the logs of any build on Bitrise. It can be handy if, for example, you do not want new team members to see potentially sensitive information that is displayed in previous logs.

Not all team members are authorized to delete logs: only those with either Admin or Owner role in the team can do it.

### Deletion is final

Be aware that you cannot undo deleting a log. Once you delete it, there is no way to recover the log file.

1. Find your app on the Dashboard, and select it.

2. On the app's main page, select the build you want to check out.

3. Open the dropdown menu and click the button.

4. In the pop-up window, click .