|
| 1 | +--- |
| 2 | +title:"View/download runtime logs" |
| 3 | +description:"" |
| 4 | +group:runtime |
| 5 | +toc:true |
| 6 | +--- |
| 7 | + |
| 8 | +Logs are available for completed runtimes, both for the runtime and for individual runtime components. Download runtime log files for offline viewing and analysis, or view online logs for a runtime component, and download if needed for offline analysis. Online logs support free-text search, search-result navigation, and line-warp for enhanced readability. |
| 9 | + |
| 10 | +Log files include events from the date of the application launch, with the newest events listed first. |
| 11 | + |
| 12 | + |
| 13 | +###Download logs for runtimes |
| 14 | +Download the log file for a runtime. The runtime log is downloaded as a`.tar.gz` file, which contains the individual log files for each runtime component. |
| 15 | + |
| 16 | +1. In the Codefresh UI, go to[Runtimes](https://g.codefresh.io/2.0/account-settings/runtimes){:target="\_blank"}. |
| 17 | +1. If needed, switch to**List View**, and then select the runtime for which to download logs. |
| 18 | +1. From the list of**Additional Actions**, select**Download All Logs**. |
| 19 | + The log file is downloaded to the Downloads folder or the folder designated for downloads, with the filename,`<runtime-name>.tar.gz`. For example,`codefreshv2-production2.tar.gz`. |
| 20 | + |
| 21 | + |
| 22 | + {% include |
| 23 | +image.html |
| 24 | +lightbox="true" |
| 25 | +file="/images/runtime/runtime-logs-download-all.png" |
| 26 | +url="/images/runtime/runtime-logs-download-all.png" |
| 27 | +alt="Download logs for selected runtime" |
| 28 | +caption="Download logs for selected runtime" |
| 29 | + max-width="40%" |
| 30 | +%} |
| 31 | + |
| 32 | + |
| 33 | +{:start="4"} |
| 34 | +1. To view the log files of the individual components, unzip the file. |
| 35 | + Here is an example of the folder with the individual logs. |
| 36 | + |
| 37 | + {% include |
| 38 | +image.html |
| 39 | +lightbox="true" |
| 40 | +file="/images/runtime/runtime-logs-folder-view.png" |
| 41 | +url="/images/runtime/runtime-logs-folder-view.png" |
| 42 | +alt="Individual log files in folder" |
| 43 | +caption="Individual log files in folder" |
| 44 | + max-width="50%" |
| 45 | +%} |
| 46 | + |
| 47 | +{:start="5"} |
| 48 | +1. Open a log file with the text editor of your choice. |
| 49 | + |
| 50 | + |
| 51 | +###View/download logs for runtime components |
| 52 | +View online logs for any runtime component, and if needed, download the log file for offline viewing and analysis. |
| 53 | + |
| 54 | +Online logs show up to 1000 of the most recent events (lines), updated in real time. Downloaded logs include all the events from the application launch to the date and time of download. |
| 55 | + |
| 56 | +1. In the Codefresh UI, go to[Runtimes](https://g.codefresh.io/2.0/account-settings/runtimes){:target="\_blank"}. |
| 57 | +1. If needed, switch to**List View**, and then select the runtime. |
| 58 | +1. Select the runtime component and then select**View Logs**. |
| 59 | + |
| 60 | + {% include |
| 61 | +image.html |
| 62 | +lightbox="true" |
| 63 | +file="/images/runtime/runtime-logs-view-component.png" |
| 64 | +url="/images/runtime/runtime-logs-view-component.png" |
| 65 | +alt="View log option for individual runtime component" |
| 66 | +caption="View log option for individual runtime component" |
| 67 | + max-width="40%" |
| 68 | +%} |
| 69 | + |
| 70 | + |
| 71 | +{:start="4"} |
| 72 | +1. Do the following: |
| 73 | +* Search by free-text for any string, and click the next and previous buttons to navigate between the search results. |
| 74 | +* To switch on line-wrap for readability, click**Wrap**. |
| 75 | + |
| 76 | + {% include |
| 77 | +image.html |
| 78 | +lightbox="true" |
| 79 | +file="/images/runtime/runtime-logs-screen-view.png" |
| 80 | +url="/images/runtime/runtime-logs-screen-view.png" |
| 81 | +alt="Runtime component log example" |
| 82 | +caption="Runtime component log example" |
| 83 | +max-width="50%" |
| 84 | +%} |
| 85 | + |
| 86 | +{:start="5"} |
| 87 | +1. To download the log, click**Download**. |
| 88 | + The file is downloaded as`<component-name>.log`. |
| 89 | + |
| 90 | +###Related information |
| 91 | +[Manage Git Sources]({{site.baseurl}}/docs/runtime/git-sources/#viewdownload-logs-for-a-git-source) |