Free cookie consent management tool by TermsFeed Customizing Application Logging
Customizing Application Logging

Overview

This page describes Appian logging configuration settings and how the settings can be changed to capture more detailed information regarding application behavior.

  • Timestamps listed in the Appian log files are recorded in Greenwich Mean Time (GMT).

  • For more information about Log4j, see the Apache Log4j2 documentation.

Application logging

Logging for the Appian application can be configured in the following manner:

  • Make your desired setting changes in <APPIAN_HOME>/deployment/web.war/WEB-INF/resources/appian_log4j.properties
  • For Appian engine server logs, create a custom log.properties file

See also: Custom Logging Configuration Files.

Should a new version of the appian_log4j.properties file be included in a future patch or software upgrade, your custom settings may be overwritten by updates to the log4j properties file. Custom log.properties files are retained during upgrades.

Search server logging

Logging for the Appian application can be configured in the following manner:

  • Make your desired setting changes in <APPIAN_HOME>/search-server/conf/log4j2.properties.

Should a new version of the log4j2.properties file be included in a future patch or software upgrade, your custom settings may be overwritten by updates to the log4j2 properties file.

Log file location

The directory where log files are written is controlled by the following property, in custom.properties.

1
conf.suite.AE_LOGS=<install_dir>/logs

See also: Custom Configurations

Changing logging levels

The table below provides a list of the different logging levels that can be specified for each component and their descriptions:

LOGGING LEVEL DESCRIPTION
DEBUG This level lists all informational events that occur within the package being logged.
INFO This level lists informational messages that highlight the progress of the application.
WARN This level lists potentially harmful situations.
ERROR This level lists all error messages that occur when the application is running.
FATAL This level lists severe events that could cause the application to abort.

When a logger is configured to output log entries at a certain level, it also writes any log entries of greater importance, as defined above. For instance, if it is set to WARN, the logger also outputs ERROR and FATAL log entries. If it is set to DEBUG, the logger writes all entries.

We recommend raising the logging level to INFO or WARN during development, while lowering it to ERROR in production. Keep in mind that increased logging negatively impacts system performance.

Common logging changes

HTML filtering

Certain HTML tags and tag attributes are forbidden as inputs and are filtered out at runtime. When a forbidden input is encountered, a message like the following is logged.

1
com.appiancorp.security.util.StringSecurityUtils - The HTML tag contained an attribute that we could not process. The request attribute has been filtered out, but the tag is still in place. The value of the attribute was ...

These messages are logged when the following logger in log4j.properties is set to the WARN level. By default, it is set to ERROR.

1
log4j.logger.com.appiancorp.security.util.StringSecurityUtils=ERROR

Unauthorized session requests

Access attempts made by sessions that do not present appropriate session credentials return HTTP: 401 (Unauthorized) errors.

These error messages are logged when the following logger in log4j.properties is set to the WARN level. By default, it is set to ERROR.

1
log4j.logger.com.appiancorp.security.csrf=ERROR

Performance logging

  • Engine Performance is automatically logged at the INFO level, as listed in log.properties.

  • You can enable database performance logging and in log4j.properties, including Tempo database performance logging.

See also: Performance Monitoring Log Files.

Database integration details

To log the details of the Write to Data Store smart services and Query Rules, add the following loggers:

1
2
3
4
 # Output SQL statements
 log4j.logger.org.hibernate.SQL=DEBUG
 # Output param values within SQL statements
 log4j.logger.org.hibernate.type=TRACE

To view the calls made by the Query Database Node, add the following logger:

1
log4j.logger.com.appiancorp.process.runtime.activities.QueryRdbmsActivity=DEBUG

Debugging CDTs created by plug-ins

When creating custom data types using a Java object in a plug-in, you can review the XSD being generated by the Java object by adding the following logger to log4j.properties.

1
log4j.logger.com.appiancorp.common.xml.JaxbXsdGenerator=DEBUG

See also: Custom Data Types from Java Object

Customizing logging

The appian_log4j.properties file allows administrators to set up customized logging for different components of Appian.

Creating a custom logger

You can create customized loggers in the appian_log4j.properties file by entering the package you want logged using the following pattern.

1
log4j.logger.<package_name>=<logging_level>

For example, to add a custom logger at the DEBUG level for the portal component only, type the following statement in the appian_log4j.properties file.

1
log4j.logger.com.appiancorp.ap2=DEBUG

For each logger, you can configure the logging level. (The output formats, or appenders, vary according to property file used.) You can also configure groups of loggers using parent packages. For instance, if you configure com.appiancorp.common, then its log level applies to any classes in that package and any of its subpackages (recursively). log4j uses the most specific configuration available for a particular logger, so if both com.appiancorp.common and com.appiancorp.common.struts.BaseAction are configured, it uses the latter's configuration because it is more specific.

Appenders

In the appian_log4j.properties file, appenders are used to define the output formats of the log file messages. The appenders are listed in the root logger, which uses the following convention.

1
log4j.rootLogger=<LOGGING_LEVEL>, <APPENDER_NAME_1>, <APPENDER_NAME_2>

In the following example, the root logger statement writes ERROR level messages (and above) using two appenders (console for and a named text file appender for ).

1
log4j.rootLogger=ERROR, CONSOLE, WORK_POLLER

This sample appender (named the WORK_POLLER appender) writes messages to a text file named work-poller.log.

1
2
3
4
5
6
7
###### WORK_POLLER appender
log4j.appender.WORK_POLLER.layout=org.apache.log4j.PatternLayout
log4j.appender.WORK_POLLER.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
log4j.appender.WORK_POLLER=org.apache.log4j.RollingFileAppender
log4j.appender.WORK_POLLER.File=${AE_LOGS}/work-poller.log
log4j.appender.WORK_POLLER.MaxFileSize=10MB
log4j.appender.WORK_POLLER.MaxBackupIndex=<b>1000</b>

Changing the logging directory or filename

The log file name and path is determined by the log4j.appender.<APPENDER_NAME>.File property (in <APPIAN_HOME>/deployment/web.war/WEB-INF/resources/appian_log4j.properties). In the prior example, the log4j.appender.WORK_POLLER.File property is set to write to the work-poller.log file in the <APPIAN_HOME>/logs/ directory. You can modify this property to write to a different directory and or filename.

Changing log syntax

The pattern of the log message is defined in the log4j.appender.<APPENDER_NAME>.layout.ConversionPattern property. You can modify this property based on various options defined in the Log4j documentation.

See also: Log4j Documentation.

Backup and remove log files

Appian stores its log files in the /logs/ directory. The maximum size for any log file is determined by property `log4j.appender..MaxFileSize` property, which has been set to `10MB`. Modify this property to increase or decrease the maximum size of the file. Each time the size of the file exceeds what is allowed, a new file is created. The number of files that are created are limited by the `log4j.appender..MaxBackupIndex` property. The default value of this property is `1000`.

Log file maintenance is handled by the cleanup script: <APPIAN_HOME>/server/_scripts/cleanup.bat (.sh).

See also: Data Maintenance

Application engine logging

The log.properties file is used to configure logging for the Appian Real-time database processes in Appian. It is located within the <APPIAN_HOME>/server/_conf/logging/ directory. This properties file uses the same configuration settings and conventions as the appian_log4j.properties file - and is configured in the same manner. The log entries are written to the <APPIAN_HOME>/logs/ directory.

Custom logging configuration files

To customize logging for a specific engine:

  1. Create a complete duplicate of the appian_log.properties configuration file, in the same directory.

  2. Name the file log_db_YY.properties according to the below table.

  3. Edit the log file settings as needed.

The following table describes the logging property file names that can be used to customize logging for an individual application engine.

Service Name Custom Server Logging File
Channels log_db_CH.properties
Collaboration Statistics log_db_CS.properties
Collaboration log_db_CO.properties
Notifications Email log_db_NE.properties
Notifications Service log_db_NO.properties
Personalization log_db_PE.properties
Portal log_db_PO.properties
Discussion Forums log_db_DF.properties
Process-Analytics log_db_PA.properties
Process-Execution log_db_PX.properties
Process-Design log_db_PD.properties

Custom log files generated

Engine Server Server Log File Name (included ID and timestamp ) Gateway Log File Name
Channels db_CH1_<date>_<number>.log channels.log
Collaboration Statistics db_CS1_<date>_<number>.log download-stats.log
Collaboration db_CO1_<date>_<number>.log content.log
Notifications Email db_NE1_<date>_<number>.log notifications-email.log
Notifications db_NO1_<date>_<number>.log notifications.log
Personalization db_PE1_<date>_<number>.log groups.log
Portal db_PO1_<date>_<number>.log portal.log
Discussion Forums db_DF1_<date>_<number>.log forums.log
Process-Analytics db_PA00001_<date>.log
db_PA00011_<date>.log
db_PA00021_<date>.log
db_PA000n1_<date>.log
analytics00.log
analytics01.log
analytics02.log
analyticsnn.log
Process-Execution db_PX001_<date>_<number>.log
db_PX011_<date>_<number>.log
db_PX021_<date>_<number>.log
db_PX0n1_<date>_<number>.log
execution00.log
execution01.log
execution02.log
executionnn.log
Process-Design db_PD1_<date>_<number>.log process-design.log

Customizing Application Logging

FEEDBACK