Last updated Jul 20, 2023

This section describes a Forge preview feature. Preview features are deemed stable; however, they remain under active development and may be subject to shorter deprecation windows. Preview features are suitable for early adopters in production environments.

We release preview features so partners and developers can study, test, and integrate them prior to General Availability (GA). For more information, see Forge release phases: EAP, Preview, and GA.

View app logs (new experience)

App logs give you the information you need in order to debug your apps. Logs are enabled by default when a user installs your app, and are displayed in the developer console. If you need to view app logs for a site where the user has disabled log access, you can ask them to re-enable access.

Before you begin

The content on this page is written under the assumption that the new experience of logs is available for your Forge app. This new experience provides capabilities that further refine log results, including using new filters, such as log levels, and searching for log messages.

In the new experience, the Logs screen would display like the following:

A list of logs and the associated filters

  • If you see a different screen, the new experience may not be available for your Forge app at this time. This may be because your users are running on multiple versions of your app and one of the versions isn't compatible with the new experience. See this documentation to know how to use the previous Logs screen.
  • To get the new experience for your app, we recommend doing one or both of the following:
    • Make sure your app is on the latest version of Forge runtime by running forge deploy for a minor version upgrade.
    • Encourage your users to upgrade to the latest version of your app. Site admins may need to provide consent if a major version upgrade of their app is required.
  • If you see the new screen but prefer to use the previous Logs screen, select Classic view in the top-right corner. You can always switch back to the new experience by selecting New view.

View app logs

To view app logs:

  1. Access the developer console.
  2. In the left menu, select Logs.

The screen shows logs for all sites that users have granted you access to.

A list of logs and the associated filters

A maximum of 20 log events are displayed by default. To view more log events, select Load more logs at the bottom of the page.

Log table

The table contains a list of your logs.

  • Level: Displays the log level. This can be chosen by your app, by inserting log statements such as console.log, console.warn in your app’s code. Unhandled errors are assigned the Error level, and include both app errors and platform errors.
  • Date/Time(UTC): Displays the time that the log was created in UTC.
  • Details: Shows a concatenated preview of the log message. Select anywhere in a row to expand it and view the entire log message. See Log messages for more details.

Logs are shown for a single invocation. To see logs for another invocation, select Load logs for another invocation.

Log attributes

Expanding a row in the log table lets you view all log details, including the attributes from the state of the app.

  • Invocation ID: A unique identifier for the specific app invocation that generated the log lines.
  • Trace ID: A request identifier that can be used to track log lines across different Forge invocations and remote API calls.
  • Module: The name of the module where this log line was generated.
  • Function: The name of the function where this log line was generated.
  • Version: The version of the app that's installed on the site.
  • Site: The name of the site where the app was invoked from.
  • Environment: The specific environment (development, staging, or production) where the app is currently running in.
  • Product: The Atlassian product onto which the app is installed.

Log message searches

You can search for specific log messages to further refine your logs. This helps narrow down logs when you have a particular log message in mind.

To search for log messages:

  1. In the search box above, enter the log message you’re searching for.
  2. Hit Enter on your keyboard or select the search icon.
  • To clear your search results, select the X button in the search box.
  • You can only search for log messages. You can't search for log attributes from the state of the app.

Filters

You can use filters to further refine your logs. Depending on the version of Forge Runtime that the app is on, you may have varying filters that you can use.

  • Site: Narrows down the logs based on the site that your app is installed onto, for example, https://your-domain.atlassian.net. You can select a maximum of 50 sites.
  • Environment: Narrows down the logs for a specific app environment for your Forge app.
  • Time range: Narrows down the logs for a specific time range that you set. Choose from a range of predefined values, such as the Last 24 hours, or choose a more specific time interval using the Custom option.
  • Log level: Narrows down the logs based on the log level type that you set.
  • You can’t filter by product. For example, you can’t narrow down logs just for Jira instances on a particular site.
  • Logs are only available for the past 60 days and all dates are in UTC.
  • To clear your filters, select Reset to default.

Download app logs

You can download app logs, based on the filters you've chosen.

To download app logs:

  1. Use filters to further refine your logs as necessary.

  2. Select the Download button.

  3. In the menu that appears, select one of the following format options:

    • Logs as .csv, where data values are separated by commas, allowing for data transfer with little or no reformatting needed.
    • Logs as .log, which is a zipped file that contains a .log file, making it easier for systems to consume downladed files programmatically.
  • The maximum file size when downloading logs is 100MB.
  • Each downloaded log file has a maximum of 96,000 log lines.
  • To handle these limits, we recommend using filters before downloading logs.

Limitations

The log access functionality in the developer console is an evolving feature.

  • When filtering by multiple sites, data is aggregated from all selected sites, rather than individual sites.
  • Logs for only a maximum of 400 app installations can be displayed at a given time. We recommend using filters to view logs for specific sites.

View app installations

To see a list of sites that your app is currently installed onto, select Installations in the left menu.

Rate this page: