Configure xConnect operation logging
Extended xConnect logging includes tracking xConnect commands and the states of operations before and after running the command.
Each operation has a unique batch ID. If an operation fails, it logs the predecessor’s and successor’s operations IDs as well. It is disabled by default.
The xConnect operation log output contains log entries for each command run and a BatchId field. You can find logs of related commands using this BatchId.
The log output contains:
-
A batch ID.
-
The operation name.
-
The operation ID in the batch.
-
The status of the operation run.
-
The operation parameters (for example, contact IDs, identifier fields, and facet information).
-
The operation IDs of predecessors or successors.
Enable xConnect operation logging
To enable xConnect operation logging:
-
Enable the file
\App_Data\Config\Sitecore\Collection\sc.XConnect.Collection.Web.Logging.xml.disabledby renaming the file to\App_Data\Config\Sitecore\Collection\sc.XConnect.Collection.Web.Logging.xml.
xConnect operation log example
The xConnect operation log output contains log entries for each command run. For example:
Change the log level
If the xConnect operation throws an exception while it runs, it logs one of the following types:
-
Only type(only the type of the exception). -
Medium(the type of the exception and a message). -
Full(the full information that the exception instance contains).
By default, the log type level is Medium.
To change the log type level:
-
Open the config file
\App_Data\Config\Sitecore\Collection\sc.XConnect.Collection.Web.Logging.xmland modify the value of theSettings/Sitecore/XConnect/Collection/Services/ExceptionLogFormatter/Options/ExceptionLogLevelnode.
OnlyType level exception example
The following is an example of the log output with a OnlyType log level:
Medium level exception example:
The following is an example of the log output with a Medium log level:
Full level exception example:
The following is an example of the log output with a Full log level: