We're heading to Adobe Summit 2025 (Mar 18-20)! Visit our booth 1290A and win big! Let’s meet at Summit
how-to-access-logs-of-adobe-cloud-manager-using-adobe-io.png

How to access logs of Adobe Cloud Manager using Adobe I/O

Oct 15th, 2024 | Atik Mujawar

Managing logs is a critical part of maintaining the health and performance of Adobe Experience Manager (AEM) projects. With Adobe Cloud Manager, integrated with Adobe I/O CLI, developers can easily access, download and monitor logs in real time. This article provides a detailed walkthrough on how to efficiently access and manage logs of AEM environments using Adobe Cloud Manager.



Prerequisites for Managing Logs with Adobe I/O CLI

Before you can begin accessing your logs, ensure you have the following prerequisites set up:

  1. Node.js Installation: You need to have Node.js version 16.x or higher installed. To install, open your terminal and execute the following command:
  2. $ brew install node
    

    Verify the installation with:

    $ node -v
    $ npm -v
    
  3. Adobe Cloud Manager Account: Ensure you have valid credentials for Adobe Cloud Manager.

  4. Adobe Cloud Manager CLI (Command Line Interface): Install the CLI globally using npm:
  5. $ npm install -g @adobe/aio-cli
    
  6. Adobe Cloud Manager CLI Plugin: Install the Cloud Manager plugin with:
  7. $ aio plugins:install @adobe/aio-cli-plugin-cloudmanager
    

Step 1: Authenticate with Adobe Cloud Manager

The first step is to log in to your Adobe Cloud Manager account through the CLI to ensure secure operations. Use the following command:

$ aio auth:login

This will authenticate your account and allow authorized access to all subsequent operations.


Step 2: Select Organization and Program

Once authenticated, follow these steps to select the organization and program where your AEM project is located.

  1. List Organizations
  2. Retrieve a list of organizations associated with your Adobe Cloud Manager account:

    $ aio cloudmanager:org:list
    
  3. Select Organization
  4. Choose the organization where your AEM project resides by running:

    $ aio cloudmanager:org:select <organization_id>
    

    Replace <organization_id> with the ID of your organization.

  5. List Available Programs
  6. After selecting your organization, view the programs available within it:

    $ aio cloudmanager:list-programs
    
  7. Select Program
  8. Finally, set the program ID for the AEM project by running:

    $ aio config:set cloudmanager_programid <program_id>
    

    Replace <program_id> with the ID of your program.


    Step 3: List Environments

    Once the program is set, the next step is to list the available environments for your AEM project:

    $ aio cloudmanager:list-environments
    

    This command will display a list of all environments associated with the selected program, helping you to choose the correct environment for log management.



    Step 4: View available Log options

    To understand the types of logs available for a specific environment, list the log options:

    $ aio cloudmanager:list-available-log-options <environment_id>
    

    Replace <environment_id> with the ID of your environment.

    Available Log Options

    Here are the types of logs you can access:

    • aemerror: Logs runtime errors and exceptions within the AEM instance.
    • aemaccess: Captures HTTP request logs, including details such as request time and response status.
    • requestlog: Provides detailed information about request durations and outcomes.
    • auditlog: Records of operations for auditing purposes.
    • replicationlog: Logs events related to content replication between AEM instances.
    • dispatcherlog: Logs requests processed by the Adobe Dispatcher.
    • authorrequestlog: Logs requests specific to the AEM authoring environment.
    • publishrequestlog: Logs requests specific to the AEM publishing environment.


    Step 5: Download Logs

    To download logs for a specific environment, specify the log type and file path:

    $ aio cloudmanager:download-logs <environment_id> <service> <log_type>
    

    Replace <environment_id>, <service>, and <log_type> with appropriate values for your use case.



    Step 6: Tail Logs (Real-Time Monitoring)

    For real-time monitoring of logs, use the following command:

    $ aio cloudmanager:environment:tail-log <environment_id> <service> <log_type>
    

    This command allows you to monitor the logs live as they are generated, which is especially useful for immediate troubleshooting and diagnosing issues in real time.


    Conclusion

    Effective log management is vital for the smooth operation of your Adobe Experience Manager projects. By utilizing Adobe Cloud Manager integrated with Adobe I/O CLI, you gain access to robust tools that simplify log management tasks such as downloading and real-time monitoring. This guide provides step-by-step instructions on how to authenticate, select the appropriate environment, and access various log types for your AEM projects.

    Whether you're troubleshooting performance issues, analyzing request logs, or ensuring your environment's health, Adobe Cloud Manager and Adobe I/O offer the capabilities needed to manage your AEM logs effectively.

    If you need assistance with Adobe Cloud Manager or any other aspect of Adobe Experience Cloud, reach out to our Adobe experts. We're here to help you navigate and optimize your Adobe solutions to enhance your digital experiences.

    For more detailed information and latest updates, refer to the Adobe I/O CLI documentation.