Global Navigation

  • Products
  • Overview
  • Getting Started
  • Guides
  • Resources
  • Console

Table of Contents

  • Introduction
    • App Builder Overview
    • What is App Builder
    • Business Case
    • FAQ
    • Community
  • Quick Start
    • App Builder Getting Started
      • Setting Up
      • Creating your First App
      • Publishing Your App
      • Troubleshooting
    • Runtime Getting Started
      • Overview
      • Activations
      • Deploy
      • Entities
      • How Runtime Works
      • Resources
      • Setup
      • Understanding Runtime
  • Develop
    • References
    • App Builder Guides
      • Architecture Overview
        • App Hooks
        • Introduction to React Spectrum
        • Using SDKs
      • Application State
      • Application Logging
        • Azure Log Analytics
        • New Relic
        • Splunk Cloud
        • Splunk Enterprise
      • Configuration
        • Webpack Configuration
      • Deployment
        • CI/CD for App Builder Apps
        • Credential Rotation
        • Setting Response Headers
      • Development
      • Distribution
      • Events
        • Webhooks
      • Exc App
        • Interfaces
          • Modules
          • Page ObjectWithHref
          • Page ObjectWithPath
          • Page PageAPI
          • Page PageAPIProperties
          • Runtime
          • TopBar Callback
          • TopBar CustomFeedbackConfig
          • TopBar CustomSearchConfig
          • TopBar ExternalFeedbackConfig
          • TopBar HelpCenterFeedbackConfig
          • TopBar Solution
          • TopBar TopBarAPI
          • TopBar TopBarAPIProperties
          • User UserAPI
          • User UserInfo
        • Migrate App to Exp Cloud SPA
        • Modules
          • Page
          • TopBar
          • User
      • Extensions
        • Extension Migration Guide
      • Optimization
      • Security
        • Understanding Authentication
      • Telemetry
    • Runtime Guides
      • Contribution Guide
      • Asynchronous Calls
      • Creating Actions
      • Creating REST APIs
      • CI/CD Pipeline
      • Debugging
      • Logging & Monitoring
      • Reference Docs
        • API Reference
        • CLI Usage
        • Configuring Proxy
        • Environment Variables
        • Feeds
        • Multiple Regions
        • Packages
        • Prepackages
        • Runtimes
        • Sequences & Compositions
        • Triggers & Rules
        • WSK Usage
      • Security General
      • Securing Web Actions
      • System Settings
      • Throughput Tuning
      • Tools
        • CLI Install
      • Troubleshooting
      • Using Packages
      • Using Runtime
    • Contribution Guide
  • Learning
    • Asset Compute Worker PS API
      • Requirements
      • Lesson 1: Create an app from Asset Compute template
      • Lesson 2: Configure the app
      • Lesson 3: Develop worker calling Photoshop API
      • Lesson 4: Integrate worker in AEMaaCS
      • Well done
    • Barcode Reader
      • Requirements
      • Lesson 1: Bootstrap a Headless App
      • Lesson 2: Writing a Serverless Action
      • Lesson 3: Unit and E2E Tests
      • Well done
    • Blog Articles
      • Blog Articles
    • CI/CD
      • Requirements
      • Lesson 1: Setup CI/CD
      • Lesson 2: Monitoring CI/CD
      • Lesson 3: Custom CI/CD workflow
      • Well done
    • Cron Jobs
      • Requirements
      • Lesson 1: Bootstrap a Headless App
      • Lesson 2: Set up Alarm Feed with Trigger and Rule
      • Lesson 3: Types of Alarm Feed
      • Well done
    • Custom Asset Compute Worker
      • Requirements
      • How AEM as Cloud assets works
      • Architecture of our worker
      • Configure services
      • Local environment setup
      • Implement the worker
      • Test the worker
      • Setup AEM to use the worker
      • Well Done
    • Customer Dashboard
      • Requirements
      • Lesson 1: Create a New App Builder App from Campaign Standard Template
      • Lesson 2: Explore the App Builder App
      • Lesson 3: Run the App Builder App Locally
      • Lesson 4: List All Customer Profiles on the UI
      • Lesson 5: Add Personalized Promotion Emails Triggering
      • Well Done
    • Debugging
      • Requirements
      • Lesson 1: Getting familiar with Debugger
      • Lesson 2: Debugging Application Code
      • Lesson 3: Managing Application Logs
      • Well Done
    • Event Driven
      • Requirements
      • Lesson 1: Create a New App Builder App from Template
      • Lesson 2: Register the App as Event Provider
      • Lesson 3: Fire an Event
      • Lesson 4: Consume Events
      • Well Done
    • Events Runtime
      • Requirements
      • Lesson 1: Step by Step Guide
      • Lesson 2: Verify the result
      • Well done
    • Journaling Events
      • Requirements
      • Lesson 1: Create an Event Provider using App Builder
      • Lesson 2: Create the Event Consumer using Journaling API
      • Lesson 3: End to end test
      • Well done
    • Sample Apps
      • Code Snippets
        • Caching HTTP responses
        • App Builder Files SDK
        • App Builder State SDK
        • I/O Events handler
        • Real-time data from Adobe Analytics API 1.4
    • Spectrum Introduction
      • Lesson 1: What is Spectrum ?
      • Lesson 2: Using Spectrum CSS
      • Lesson 3: Using React Spectrum
      • Lesson 4: Using React Spectrum in App Builder
      • Well done
    • Todo App
      • Requirements
      • Lesson 1: Create a New App Builder App with the React Spectrum template
      • Lesson 2: Setup Runtime actions
      • Lesson 3: Setup the CreateTodoList component
      • Lesson 4: Setup the Todo component
      • Lesson 5: Setup the TodoList component
      • Lesson 6: Bringing the pieces together to build the App
      • Well done
    • Videos
      • Overview
        • Introducing App Builder
        • Getting Started
        • Architecture
        • A Full Security Overview
        • User Journey
      • Exploring
        • Projects and Workspaces
        • React Spectrum
        • Custom Events
        • CI/CD
        • Debugging
        • Learning Resources
        • Dashboard Case Study
        • ODE Case Study
        • Deep Dive Use Cases
        • Live Wired Sneak
        • Softcrylic Partner Showcase
      • Developers Live
        • App Builder Deep Dive
        • Asset Compute Service Extensibility
        • Extend Adobe Experience Cloud
  1. Products
  2. Overview
  3. Guides
  4. Develop
  5. App Builder Guides
  6. Application Logging

Managing Application Logs

Logging is one of the most important tools in a Developer's tool kit. Application logs allow Developers to debug applications in development and monitor them in production. The App Builder SDK and CLI provide significant capabilities to facilitate application logging from code, and viewing or forwarding them.

Logging with App Builder SDK

The App Builder SDK provides a core logging library that defines an API on top of the popular WinstonJS and Debug npm packages. The core logging library can be used in a Runtime action or in other libraries.

The App Builder core logging library can be also used with the App Builder core errors library. The core errors library streamlines error management across the AIO SDK and App Builder applications. When the core errors library is used in conjunction with the core logging library, error log messages output specific error codes, as defined by each App Builder SDK, that further aid debugging.

Both the core logging library and the core errors library can be used directly in an App Builder application, a Runtime action, and other libraries. For example, both libraries are used in:

  • The App Builder SDK itself
  • Higher-level SDK libraries such as the Real-time Customer Profile SDK library
  • Shared Runtime actions such as the Token Vending Machine
data-slots=text
When a new App Builder application is bootstrapped from the AIO CLI using the aio app init command, the generated boilerplate action code integrates with both the core and errors logging libraries by default.

Accessing logs with App Builder CLI

App Builder CLI exposes application logs to Developers at different levels:

  • At an App Builder application level, using the aio app plugin
  • At a Runtime action level, using the aio runtime plugin

App Builder app plugin

The AIO CLI App plugin provides the aio app logs command, which fetches the logs for an App Builder application deployed to the App Builder Workspace configured in the current working folder. The command:

  • Accepts an integer argument with the --limit flag that allows fetching logs from the last n Runtime activations
  • Accepts an action name with the --action flag that allows fetching logs from a particular action within the App Builder application
  • Allows a --tail or --watch flag that continuously fetches logs as they appear

To see more command options, run aio app logs --help on your terminal.

The aio app logs command can be used by developers or by scripts running in a CI/CD pipeline. The command can also be used for App Builder Applications deployed on Runtime, or running locally through the aio app run --local command as discussed in the Deployment Guide.

Runtime plugin

The AIO CLI Runtime plugin operates at the level of a Runtime action. When a Runtime action is invoked, the corresponding activation's logs can be fetched using the aio runtime logs <activation_id> command.

This command also offers options to --watch or --tail the logs, and other options you can review by running aio runtime logs --help.

As with aio app logs, the aio runtime logs command can be used by Developers or by scripts running in a Deployment Guide. The command can also be used for App Builder applications deployed on Runtime or running locally through the aio app run --local command as discussed in the Deployment Guide.

Forwarding Application logs

In addition to viewing application logs using the AIO CLI, Developers can configure App Builder applications to forward all application logs to a customer-owned log management solution. Forwarding logs has several benefits over retrieving them through the AIO CLI, especially for applications deployed in Production or Staging environments.

Supported log management solutions include:

  • Adobe I/O Runtime (default)
  • Splunk Cloud
  • Splunk Enterprise
  • Azure Log Analytics
  • New Relic

Follow these links to see how to set up log forwarding using each solution.

When to use log forwarding

This table compares storing application logs in Adobe I/O Runtime and forwarding them to a log management solution:

Storing logs in I/O Runtime
Forwarding logs
Setup
Workspaces default to storing logs in Runtime. Included in App Builder SKU.
Log Forwarding must be configured per App Builder application workspace. Requires a separate log management solution.
Use cases
Good for local development, or when Developers work in separate workspaces.
Ideal for shared environments such as Stage and Production workspaces.
Access
Stores application logs only for failed or asynchronous activations.
Allows access to all application logs.
Retrieval
The AIO CLI can be used to fetch logs.
Logs must be retrieved logs from the separate log management solution.
Limits
Maximum 10 MB per activation, beyond which I/O Runtime truncates log lines.
Maximum 10 MB per activation, beyond which I/O Runtime truncates log lines.
Throttling
The x-ow-extra-logging header directs Adobe I/O Runtime to store all application logs. But it's meant to be used only in local development, and  overuse is throttled at high log volumes.
Use of x-ow-extra-logging is unnecessary: logs are forwarded by design.
Retention
Logs are retained for 7 days.
Forwarded logs may be retained for any duration specified.
Capabilities
You may view or tail application logs on a per-application or per-activation level using AIO CLI.
Most log management solutions support viewing logs, search through unstructured logs, and charting of data extracted from logs. Forwarding logs also allows consolidation and correlation of App Builder logs with the logs from other infrastructure.

Log forwarding commands

Setting log forwarding

This command allows you to configure log forwarding for your workspace or reset it to store logs in Adobe I/O Runtime:

aio app config set log-forwarding

Once a log forwarding configuration is set, it is stored in the .aio and .env files. Any changes made to the configuration in the .aio or .env file will be deployed when you run aio app deploy.

Running aio app deploy --no-actions or aio app deploy --no-log-forwarding-update skips deployment of these changes.

Please visit the Guide for your log management solution of interest to see how to set up log forwarding.

  • Splunk Cloud
  • Splunk Enterprise
  • Azure Log Analytics
  • New Relic

Viewing the current log forwarding configuration

This command displays the current log forwarding configuration for your workspace and compares it to the locally set log forwarding configuration:

aio app config get log-forwarding

If log forwarding is not configured for your workspace, Adobe I/O Runtime will be returned by default. Note that for security reasons, Adobe never returns configured secrets from our servers.

Debugging log forwarding

This command outputs any errors that occurred when application logs were being forwarded to your configured log management solution:

aio app config get log-forwarding errors

It returns the most recent 10 log forwarding errors for the current log forwarding configuration, to a maximum of 30 days.

Next steps

Return to Guides Index.

Return to App Builder Overview.