Actions Real-time Logs

The Actions Real-time Logs feature displays all logs in real-time for the custom code in your account. This includes all console.log output and exceptions. These logs are helpful while debugging your Actions, Custom Database scripts, and Custom Social Connections.

How to use

To view the real-time logs for your custom code:

  1. Navigate to Auth0 Dashboard > Monitoring > Actions Logs.

  2. Wait until the stream is connected. Connectivity attempts automatically.

  3. Once connected, log entries appear in the main panel as they occur.

Real-time action logs in dashboard

Features

The Actions Real-time logs panel allows you to monitor system activity as it happens. This provides live feedback on Actions executed through the dashboard, making it easier to identify issues, confirm successful operations, or simply observe system behavior in real-time. See below for a detailed list of the current functionality available in this feature.

Live log streaming

Log entries are streamed live as they are generated by Actions. As each Action is executed, its corresponding log entry appears in the log panel automatically, with no need to refresh the page.

Connection status

The top of the panel displays the current connection status between your browser and the log stream. This helps you confirm whether logs are actively being received. Common statuses include:

Status Description
Connecting To Log Stream... Attempting to establish a connection.
CONNECTED Successfully connected and receiving logs.
DISCONNECTED Not currently connected to the stream.

Search functionality

Use the search bar at the top of the panel to filter the log entries. You can search by:

  • Keywords or phrases

  • Specific error codes

  • Exact log messages

This is especially useful when scanning large volumes of logs for a specific Action or issue.

Options menu (...)

Click the Options menu in the top-right corner of the log panel to access additional controls.

  • Local Time: Toggles the timestamp display for log entries between the server's default time (often UTC) and the user's local browser time.

  • Download: Allows you to download the currently displayed logs as a JSON file for offline analysis, sharing, or archival.

  • Clear Logs: Clears all log entries currently visible in the display window. This does not delete logs from system storage, only your current view.

Scroll to bottom

When new entries arrive and are out of view, a Scroll to bottom button appears in the log panel. Clicking this will jump you to the most recent log entry, ensuring you're always up-to-date with the latest activity.

Debug an Action

The following example describes how to create a generic Hello World Action, run it, and use the Actions Real-time Logs to see the results.

  1. Follow the instructions to Write Your First Action to write a Post Login Action using the code example below:

    /**
    * Handler that will be called during the execution of a PostLogin flow.
    *
    * @param {Event} event - Details about the user and the context in which they are logging in.
    * @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.
    */
    exports.onExecutePostLogin = async (event, api) => {
      console.log('Hello World!');
    };
    
    /**
    * Handler that will be invoked when this action is resuming after an external redirect. If your
    * onExecutePostLogin function does not perform a redirect, this function can be safely ignored.
    *
    * @param {Event} event - Details about the user and the context in which they are logging in.
    * @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.
    */
    // exports.onContinuePostLogin = async (event, api) => {
    // };

    Was this helpful?

    /

  2. Open a new tab, navigate to Navigate to Auth0 Dashboard > Monitoring > Actions Logs

  3. Once the stream is connected, switch to your Action Editor and run a test.

  4. Your results should appear in real-time in your Actions Real-time Logs.

Supported statements

The following table outlines the JavaScript console statements supported by the real-time logging feature:

Statement Description Use Case
console.log() General-purpose logging of information. Basic informational messages, variable values.
console.info() Informational messages highlighting application progress or state. Reporting successful operations, application milestones.
console.warn() Indicates potential issues or unexpected situations that are not critical errors. Flagging non-critical problems, deprecated features.
console.error() Reports errors that have occurred within the application. Indicating failures, exceptions, and critical issues.
console.trace() Displays a stack trace, showing the sequence of function calls leading to the current point. Debugging complex call flows, understanding the origin of issues.

もっと詳しく