Free cookie consent management tool by TermsFeed

Customizing Log Output

On This Page

This page describes how to customize Appian logging to capture more detailed information about application behavior. The page covers how Appian logging works, the available logging levels, and how to configure logging for the web application, search server, and application engines.

This page applies to administrators who configure Appian log files.

How Appian logging works

Appian logging configuration settings control what information Appian captures in the log files about application behavior.

Appian uses Log4j-based logging, configured through different files depending on the component:

  • Web application: The web application is configured through a Log4j properties file (appian_log4j.properties).
  • Search server: The search server is configured through a Log4j properties file (log4j2.properties).
  • Application engines: The Appian real-time database processes are configured through Log4j-based per-engine files (log.properties), following the same conventions as appian_log4j.properties.

Note:  When you change these settings, keep in mind that timestamps listed in the Appian log files are recorded in Greenwich Mean Time (GMT).

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

Log file location

In Kubernetes, various Appian pods run in their own containers where Appian is installed at /usr/local/appian/ae in those container images. The directories are fixed to the configured locations and cannot be changed.

Logging levels

The following table provides a list of the different logging levels that you can specify for each component and their descriptions.

Logging Level Description
DEBUG All informational events that occur within the package being logged
INFO Informational messages that highlight application progress
WARN Potentially harmful situations
ERROR All error messages that occur when the application is running
FATAL 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 in the preceding logging levels table. For instance, if a logger is set to WARN, the logger also outputs ERROR and FATAL log entries. If a logger is set to DEBUG, the logger writes all entries.

During development, we recommend that you raise the logging level to INFO or WARN. In production, increased logging can negatively impact system performance, so we recommend that you lower the logging level to ERROR once in production.

Web application logging

The appian_log4j.properties file allows administrators to set up customized logging for different components of Appian. To configure web application logging, make your setting changes in the following file:

1
<APPIAN_HOME>/deployment/web.war/WEB-INF/resources/appian_log4j.properties

Custom settings set in the appian_log4j.properties file are reset to Appian defaults when you patch or upgrade your installation. Keep a backup of your appian_log4j.properties file so you can restore your custom settings after upgrading.

Create 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>

Change 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 WORK_POLLER appender 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.

Change the 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.

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 ...

By default, the logger that captures messages about forbidden inputs is set to ERROR. To capture essages about forbidden inputs, set the following logger in appian_log4j.properties to the WARN level:

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

Database integration details

To log the details of the Write to Data Store smart services, 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 smart service, add the following logger:

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

Debug custom data types created by plug-ins

When creating custom data types using a Java object in a plug-in, you can review the XML Schema Definition (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

Search server logging

To configure search server logging for the Appian application, make sure your desired setting changes are in the following file:

  • Make your desired setting changes in the following file:
    1
    
     <APPIAN_HOME>/search-server/conf/log4j2.properties
    

Custom settings set in the log4j2.properties file are reset to Appian defaults when you patch or upgrade your installation. Keep a backup of your log4j2.properties file so you can restore your custom settings after upgrading.

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.

You can also create or update a custom log.properties file. Custom log.properties files are retained during upgrades.

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 following 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

Performance logging

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

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

See also: Performance Monitoring Log Files.

Backup and remove log files

Appian stores its log files in the <APPIAN_HOME>/logs/ directory. The maximum size for any log file is determined by the log4j.appender.<APPENDER_NAME>.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.<APPENDER_NAME>.MaxBackupIndex property. The default value of this property is 1000.

Feedback