Usage log
primedocs keeps a usage log per datasource in the database. It records which templates are used and administered and is the basis of the template statistics. Unlike the server logs and client logs it is not a file but a set of entries that are evaluated via the statistics and the Admin API.
Content of an entry
| Field | Content |
|---|---|
| Time | Time of the event in UTC |
| Action | Open (document created from a template or updated via Connect), Create, Update or Delete. Package imports write PackageImport.Create, PackageImport.Update and PackageImport.Deactivate |
| Object | Type, ID and name of the object concerned, for example a template |
| Language | Document language in which the template was used |
| Organisational unit | ID and name of the organisational unit the document was created for |
| User | ID and name of the acting person. Only if the privacy setting allows it, see below |
| Message, changes | For package imports, the description of the change and the ChangesetId of the run |
Action, user name, object name and organisational unit are truncated to 200 characters, the message to 500 characters.
Document creation
Every document creation from a template writes an entry with the action Open, regardless of the route. Preview generations are excluded. Updating an existing document via Connect also writes Open, the editor mode of primedocs Desktop writes Update.
| Route | Template name | Organisational unit |
|---|---|---|
| primedocs Desktop and Office COM add-ins | Name in the default UI language, without a translation a placeholder. With Connect the first available name, sorted by language code (LCID) | Organisational unit of the default profile |
| primedocs Web, Office web add-ins, Connect API and other server-side creation | Name in the default UI language, without a translation the first available name, sorted by language code (LCID) | Organisational unit of the profile the document was created with |
For server-side creation, an overridden organisational unit takes precedence over the one of the profile, as for the profile data in the document itself. If only an organisational unit is passed without a profile (legacy Connect), that one applies. Without profile and organisational unit, or if the profile is not assigned to an organisational unit, the field stays empty.
primedocs Desktop first stores the entries in the local cache and transfers them to the server with the next synchronisation.
Before version 4.1, server-side creation wrote neither the template name nor the organisational unit to the log. These older entries remain unchanged. In the statistics they fall under an empty organisational unit.
Privacy: PrivacyLogUserData
The PrivacyLogUserData setting defines whether an entry contains the user:
| Value | Effect |
|---|---|
False (default) | User name and user ID are not stored. The entry is still written, with template, language and organisational unit, so that the template statistics stay complete. |
True | User name and user ID are stored as well. |
The setting applies to all routes of document creation, including primedocs Web, the Office web add-ins and the Connect API. The spelling of the key does not matter. It takes effect when an entry is written: a change only affects new entries, existing ones stay as they are.
It is set per datasource in the Web Admin under Settings › Security & Compliance, in the Admin Dashboard in the Settings area or via the Admin API (PUT .../Admin/Settings/Security, property privacyLogUserData, see Admin API).
Retention
Without further settings the entries are kept indefinitely. LogEntryRetentionDays sets a retention period in days per datasource. On every run without parameters (job LogEntryCleanup) the JobHost deletes all entries that are older. Empty, 0 or a negative value switches the cleanup off.
The setting is found in the Web Admin under Settings › Security & Compliance, in the Admin Dashboard in the Settings area and in the Admin API under .../Admin/Settings/Security (property logEntryRetentionDays). It also affects the log of the package imports, which is stored in the same table.
A PUT .../Admin/Settings/Security always writes both properties. Therefore always send both: if privacyLogUserData is missing, false applies, if logEntryRetentionDays is missing, the cleanup is switched off.
Evaluation
- In the Admin Dashboard in the Stats area, including an export of the raw data as CSV.
- Via the Admin API with the endpoints under
.../Admin/Statistics, see Admin API: statistics.