Logging Configuration
4 min
Logging for Activate is controlled via an XML configuration stored in the //Resources/Configuration/LoggingConfiguration parameter. This configuration defines how log files are created, sized, and retained across the platform. This configuration is available from version 8.3.8.
Example configuration
<configuration memorise="false">
<files>
<file name="Activate.Azure.log"
maxSizeBytes="1024"
keepLast="10"
filename="Activate.Azure.log" />
<file name="Activate.Orchestrator.log"
maxSizeBytes="1024"
keepLast="5"
filename="Activate.Orchestrator.log" />
<file name="Activate.Scheduler.Log"
maxSizeBytes="1024"
keepLast="0"
filename="Activate.Scheduler.Log" />
</files>
</configuration>Configuration behaviour
memorise
- Controls whether the logging configuration is cached in memory.
- true (default): Configuration is cached. Changes require a service restart to take effect.
- false: Disables caching, allowing configuration changes to be picked up dynamically (useful for debugging or tuning).
- This setting itself is cached, so switching between true and false still requires a restart.
files / file entries
- Each <file> element defines configuration for a specific log file.
- If a log file is not explicitly defined, default behaviour applies:
- maxSizeBytes: Falls back to the value defined in the ProvisioningFileWriter.
- keepLast: Defaults to 0 (no historical files retained).
maxSizeBytes
- Specifies the maximum size of the log file before rotation occurs.
- Overrides the value provided in the ProvisioningFileWriter constructor if present.
- If not specified, the constructor value is used.
keepLast
- Defines how many historical log files to retain.
- 0 means no history is kept (files are overwritten).
ProvisioningFileWriter interaction
If no maxSizeBytes is defined in the logging configuration, the value provided when the log writer is instantiated will apply:
using (ProvisioningFileWriter log = new ProvisioningFileWriter("Activate_MyLog.log", 512))
In this example, the log file will use a maximum size of 512 bytes unless overridden by the XML configuration.
Usage notes
- Reducing keepLast will immediately remove any existing log files beyond the new limit. Back up logs if retention is required.
- Use memorise="false" only during troubleshooting or configuration changes. For normal operation, caching should remain enabled to avoid unnecessary overhead.