---
title: "Action logging and anonymous analytics"
canonical: "https://support.appfire.com/space/ACLI/60556783/Action%20logging%20and%20anonymous%20analytics"
format: markdown
---
**On this page: **

> Macro (toc)


Starting with [ACLI Release 9.4](https://appfire.atlassian.net/wiki/spaces/ACLI/pages/60556263), we have added an option to log information for each action run. We have also implemented support to anonymize information from actions run and share that information with Appfire to guide product improvements. This helps us better understand usage patterns and decide on future improvements and features. These features are related but are independently controlled. **Action logging is *****off***** by default** and **anonymous analytics sharing is *****on***** by default**. These features are supported by the **ACLI Managed Service** discussed below.

### Action Logging

When action logging is turned on for the installation, actions are logged into a daily log file (naming pattern: *action-YYYY-MM-DD.log*) in the configured logging directory. Each log entry (a line in the file) is a JSON representation of the action and related information. In the example below a [runFromPageList](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68458067) action running [modifyPage](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68455746) is logged:

```javascript
{"serverInfo":{"baseUrl":"https:\/\/examplegear.com\/wiki","product":"Confluence","build":"b5532e6ae35f828219efdf3f57295a2415782672","buildDate":null,"version":"1000.0.0"},"exitValue":0,"actionInfo":{"server":"https:\/\/examplegear.com","common":"-a modifyPage --id @pageId@ --findReplace \"Replace this:With that\" ","action":"runFromPageList","user":"bob@appfire.com","cql":"text ~ 'Replace this'","token":"***"},"exitCode":"SUCCESS","id":"1a39045d-5215-4566-b465-31125bd457eb"}
{"exitValue":0,"actionInfo":{"action":"modifyPage","findReplace":"Replace this:With that","id":"1725136908"},"exitCode":"SUCCESS","id":"47493b71-92f9-4915-8abf-b4af5f5421c5","parentId":"1a39045d-5215-4566-b465-31125bd457eb"}
{"exitValue":0,"actionInfo":{"action":"modifyPage","findReplace":"Replace this:With that","id":"1725333565"},"exitCode":"SUCCESS","id":"7df29965-f6dc-4e5c-9eb6-b7b3763e19b1","parentId":"1a39045d-5215-4566-b465-31125bd457eb"}
{"exitValue":0,"actionInfo":{"action":"modifyPage","findReplace":"Replace this:With that","id":"1725139230"},"exitCode":"SUCCESS","id":"f21bf479-d92b-425d-9276-454a29264405","parentId":"1a39045d-5215-4566-b465-31125bd457eb"}
```

Here are the first two records from the same log presented in “prettified” JSON:

Note that each log record has an “id” property (not to be confused with the page “id” logged in the [modifyPage](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68455746) record).  In the case of actions run as part of a [run action](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68455033/Action+Types#ActionTypes-Run) the id of the run action is stored in the “parentId” property. 

### Anonymous analytics

Anonymous analytics uses the same logging information but strips the records of any identifying information. Below is how the two records above are transmitted after being anonymized:

For the purpose of planning future product features and enhancements; these anonymized analytics help us understand *how* the ACLI is used <u>without telling us anything</u> about *who*, *what*, or *where* the ACLI is being used. This helps us learn and plan for future releases while ensuring user privacy. See below on how to turn off anonymous analytics.

### Configuring logging and anonymous analytics

Both of these features are controlled on a per-installation basis with the configuration determined by the **acli-service.properties** file located in the installation directory. The configuration controls a background process that implements the support for these features and other planned features. A background process is used to minimize performance impact to normal action running. The CLI manages the background process automatically including starting it if needed as determined by the configuration. Here is an example of the service properties automatically created when an installer is used to create an installation. If the **acli-service.properties** file is missing, defaults will be used. Users installing directly using one of the distribution zip files may want to create the **acli-service.properties** file to turn off sharing analytics or to configure other aspects of our self managed service.

```plaintext
# ACLI service configuration - service is automatically started only if at least one service is requested
port = 7789

# Logging directory - either absolute path or a relative path in installation directory
loggingDirectory = logs

# Log actions only if true
actionLogging = false

# Unique identifier for this installation
installationId = 11991b6b-f512-45c6-7fc3-6bdbb2b622d1

# Level for service logging - like debug, info, warn, error
serviceLogLevel = info
```

 **Action logging will not be done** by default and **analytic data will be shared** by default. To stop sharing analytic data with Appfire, add the following to your acli-service.properties configuration:

```
shareAnalytics = false
```

### ACLI Managed Service

The ACLI self-managed service runs in the background and is a lightweight web server running on the **local host **using the configured port that defaults to port **7789**. The **loggingDirectory** defaults to **logs** in the installation directory and is the location that contains action logs (when action logging is enabled) and managed service logs.   


The ACLI service is automatically started under any of the following situations:

1. Shared analytics is turned on in configuration or is on by default
2. Action logging is turned on in configuration
3. [https://appfire.atlassian.net/wiki/spaces/ACLI/pages/60565771](https://appfire.atlassian.net/wiki/spaces/ACLI/pages/60565771) is being used

The ACLI service will be automatically stopped when it is determined that it is no longer needed. It can be stopped manually using `acli -a stopServer --port 0.` Use this before deleting the installation directory or use the `Uninstaller` available in the installation directory if dyou installed using the installer.