Go to http://[server]:[port]/lc/system/console/configMgr. Locate and open the Apace Sling logging logger configuration option. A dialog box appears:
The Logger utility enables logging for a form and helps you debug form-related issues. one can configure Logger based on the requirements and set the level and category for it for any specific request. Mobile Form has components the Mobile Forms server and Mobile Forms client runtime. You can configure loggers for both the components.
Configuring server logging
Perform the following steps to configure server logging:
-
-
Change the Log Level to Debug.
-
Specify name of log file. If you want to generate logs in the Mobile Forms log directory, add ../logs/ before the filename.
-
Change Logger to HTMLFormsPerfLogger. Click Save.
Configuring client logging
There are two ways to enable client-side logging in Mobile Forms:
- Using the request parameter named log
- Using CQ Configuration Manager
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:
http://<server>:<port>/lc/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 Destination |
Description |
1 |
Logs are directed to the browser Console |
2 |
Logs are collected in a JavaScript object on client side and can be posted to Server |
3 |
Both of the above options |
Log Levels
Log Level |
Description |
0 |
OFF |
1 |
FATAL |
2 |
ERROR |
3 |
WARN |
4 |
INFO |
5 |
DEBUG |
6 |
TRACE |
7 |
ALL |
Logger Categories
Log Category |
Description |
a |
xfa (Scripting engine-related logs) |
b |
xfaView (Layout engine-related logs) |
c |
xfaPerf (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 Configuration |
Description |
2-a4-b5-c6 |
Destination: Server |
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.
-
Log in to CQ Configuration Manager at http://<server>:<port>/lc/system/console/configMgr and log in with admin credentials.
-
Search for and click LC Forms Configurations.
-
In the Debug Options text box, enter the log configurations as described in the previous section for example, 2-a4-b5-c6
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 <livecycle-install-dir>/crx-repository/logs/ directory.
To change the location and name of the log file:
-
Log in to Configuration Manager as an administrator. The default URL of Configuration Manager is http://[Server]:[Port]/lc/system/console/configMgr.
-
Click Apache Sling Logging Logger Configuration. A dialog box appears.
-
Change the Log Level to Debug.
-
Specify path and name of the Log File.
Nota:To create logs in the same directory where other log files are kept, specify ../logs/<filename> in the Log Files property.
-
Change the Logger to HTMLFormsPerfLogger and click Save.