<commit_before>---
title: ServiceControl error.log and audit.log behavior
summary: Details how ServiceControl handles internal errors and auditing
tags:
- ServiceControl
- Error
- Audit
---
As any regular endpoint, in a messaging based system ServiceControl has its own failure protection based on error queues.

By default ServiceControl, at install time, creates a queue named `error.log` where all the messages that ServiceControl fails to process flows.

ServiceControl has also the ability to audit all messages that receives, this is required to support a scenario where auditing was previously used in the system and must be used even after the introduction of ServiceControl







To enable the forwarding of audit messages you can:
- Add `<add key="ServiceControl/ForwardAuditMessages" value="true" />` to config file
- Or add 
```
[HKEY_LOCAL_MACHINE\SOFTWARE\ParticularSoftware\ServiceControl]
"ForwardAuditMessages"="true"
```
to the registry<commit_msg>first draft related to #319, @dannycohen comments?<commit_after>---
title: ServiceControl error.log and audit.log behavior
summary: Details how ServiceControl handles internal errors and auditing
tags:
- ServiceControl
- Error
- Audit
---
As any regular endpoint, in a messaging based system ServiceControl has its own failure protection based on error queues.

By default ServiceControl, at install time, creates a queue named `error.log` where all the messages that ServiceControl fails to process flows.

ServiceControl has also the ability to audit all messages that receives, this is required to support a scenario where auditing was previously used in the production environment and must be used even after the introduction of ServiceControl.

ServiceControl supports the ability to forward all messages that receives to a predefined audit queue called audit.log, this feature must be enabled after the ServiceControl installation.

In order to enable the audit.log queue one the the following approaches can be used:

* Add a configuration setting to the ServiceControl config file: `<add key="ServiceControl/ForwardAuditMessages" value="true" />` (see how to manage ServiceControl settings for detailed instructions)
* Add the following registry key to the registry of the machine where ServiceControl is running:
```
[HKEY_LOCAL_MACHINE\SOFTWARE\ParticularSoftware\ServiceControl]
"ForwardAuditMessages"="true"
```
{'fraction_non_alphanumeric': 0.05313807531380753, 'fraction_numerical': 0.0012552301255230125, 'mean_word_length': 5.342175066312997, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3133581', 'n_tokens_mistral': 566, 'n_tokens_neox': 547, 'n_words': 300}