Enabling logging using request parameter

Using this method, you can generate logs for a particular request. The name of the request parameter is log. The log URL is as follows:

https://<server>:<port>/content/xfaforms/profiles/test.html?contentRoot=<path of the folder containing form xdp>&template=<name of the xdp>&log=<log configuration>.

The log configuration is made up of the log level and the logger category.

Log Destination

Log DestinationDescription
1Logs are directed to the browser Console
2Logs are collected in a JavaScript object on client side and can be posted to Server
3Both of the above options

Log Levels

Log LevelDescription
0OFF
1FATAL
2ERROR
3WARN
4INFO
5DEBUG
6TRACE
7ALL

Logger Categories

Log CategoryDescription
axfa (Scripting engine-related logs)
bxfaView (Layout engine-related logs)
cxfaPerf (Performance-related logs)

Log Configuration

In the log URL, the log configuration query string parameter is defined as follows:

{destination}-{a level}-{b level}-{c level}

For example:

Log ConfigurationDescription
2-a4-b5-c6Destination: Server
xfa level: INFO
xfaView level: DEBUG
xfaPerf level: TRACE
NOTE
The default log level for each log category a (xfa), b (xfaView), and c (xfaPerf) is 2 (ERROR). Accordingly, for log configuration: 2-b6, the log levels for different categories are:
a (xfa): 2 (default level ERROR)
b (xfaView): 6 (user specified TRACE)
a (xfaPerf): 2 (default level ERROR)

Enabling logging using Configuration Manager

If you use Configuration Manager for enabling logging, logs are generated for every render request until the logging is disabled again.

  1. Log in to CQ Configuration Manager at https://'[server]:[port]'/system/console/configMgr and log in with admin credentials.

  2. Search for and click Mobile Forms Configurations.

  3. In the Debug Options text box, enter the log configurations as described in the previous section for example, 2-a4-b5-c6

    Forms Configuration

    Forms Configuration

Uploading logs

If the destination is set as 1, all client script log messages are directed to the console. If an administrator requires these logs along with server logs, set destination level to 2. At this level, all logs are collected in a JS object on client side and if form is rendered with default Profile then a Send Logs button appears to the left of Highlight Existing Fields button in toolbar. When user clicks the link, all collected logs are posted to the server and are logged in the configured error log file on the server.

By default, all the information is added to the error.log file at the /crx-repository/logs/ directory.

To change the location and name of the log file:

  1. Log in to Configuration Manager as an administrator. The default URL of Configuration Manager is https://'[server]:[port]'/system/console/configMgr.

  2. Click Apache Sling Logging Logger Configuration. A dialog box appears.

    logconfig-1

  3. Change the Log Level to Debug.

  4. Specify path and name of the Log File.

    NOTE
    To create logs in the same directory where other log files are kept, specify …/logs/<filename> in the Log Files property.
  5. Change the Logger to HTMLFormsPerfLogger and click Save.

Experience Manager


Espressos & Experience Manager: AEM Forms

Espressos & Experience Manager

Thursday, Mar 6, 7:00 PM UTC

Join Adobe's AEM product team as they highlight AEM Forms' latest innovations, including: the new Gen AI Assistant, Unified Composition with AEM Sites, and new ways to deploy forms through conversations.

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more