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.
For Isolated Cloud (IC), customers don't have the option to enable or disable log sharing access to developers in Admin Hub, and app developers can't access IC logs in the developer console. IC customers can still download the app logs from Admin Hub and share them with the developer. This is the only way for developers to get access to logs of an IC customer.
For Atlassian Government Cloud (AGC) or FedRAMP, customers can enable or disable log sharing access to developers in Admin Hub, with sharing enabled by default. For more information, see Access app logs.
The screen shows logs for all sites that users have granted you access to.
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.
Atlassian app: The Atlassian app onto which the Forge app is installed.
License: The license status (active/inactive/trial) of your app installation if app is enabled for licensing
Edition: The app edition value (standard/advanced) of your installation if app is enabled for editions
Search for logs
You can search for logs using invocation ID, trace ID, log messages, and modules. This helps
narrow down log search results.
To search for logs:
In the search box above, enter the attributes of the logs you're searching for.
Hit Enter on your keyboard or select the search icon.
To clear your search results, select the X button in the search box.
To efficiently narrow your search results, use the Add to search button next to the log details
you want to filter by, such as Invocation ID, Trace ID, Function, and Site. This incorporates
those values into your search, enabling you to filter results more quickly.
Filters
You can use filters to further refine your logs.
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.