= Logging and archiving of Bonita processes
:description: How the information about your Bonita processes is recorded, and how to configure what is recorded.

How the information about your Bonita processes is recorded, and how to configure what is recorded.

== Foreword

There are three ways to record the information of a process:

* Archive: used by a business analyst or process administrator using Bonita Portal, during the production phase, to trace the running of the process instances in their life cycle. Records who did what and when.
* Technical log: used by an application developer for troubleshooting, debugging and process tuning.
* Queriable log: used by a database administrator extracting information related to business actions that is stored in the internal database to be retrieved by a database request.

You can configure the information that is recorded in the archive and the logs.

== Archive

In the portal, after a process is executed, it can be viewed using the "Archived" filter.
There you can find the information on the process instances (the cases). This information is also available using the Web REST API.
By default, all the information is archived but in the Enterprise and Performance editions this is xref:configurable-archive.adoc[configurable].

Recommended configuration (Enterprise and Performance only):

* To keep all the user activity, set all the flowNode types to true.
* To maximize the overall performance of the system and reduce the disk space used by the database, set all the values to false. Completed tasks will not be visible.

Between these two extreme cases, you can xref:configurable-archive.adoc[customize archiving] to your exact need.

== Technical log

Bonita Engine uses SLF4J to log. The default implementation embedded in the Tomcat bundle is Java Util Logging.

You can xref:logging.adoc[configure the log level]. The log level can be set on several categories in the `logging.properties` file. Some categories are very specific to a particular issue.
For example:

* If you have an issue related to the database access, it might be interesting to change the level of `org.hibernate.level` from the default, `WARNING`, to `FINE`.
* When debugging cache issues, change the level of `net.sf.ehcache.level`.
* For the process execution, the relevant properties are `org.bonitasoft.level` and (for Subscription editions) `com.bonitasoft.level`.

== Queriable log

You can use the xref:queriable-logging.adoc[queriable logger service] to log in a database the creation, deletion or update of bonita objects that are not related to a process (for instance users, groups, roles, profiles).
Items that can be archived cannot be included in the queriable log.

To configure what information you want to record in the queriable log, modify the xref:bonita-bpm-platform-setup.adoc[`bonita-tenant-sp-custom.properties`].
This file contains a map of available events. By default all are logged (the value is set to true). If you do want to log a particular event, set the value to false and restart the Bonita Engine.
