The exportFile configuration section enables and configures an alternate local text file representation of the log data stream. When enabled, the Agent will write a text version of just the log messages and exceptions in a human-reasonable form into an alternate directory structure than the normal session files.
The primary use case for these files is when it's necessary to forward log messages onto another text-based system at the same time they are captured by Loupe or to read log data on the local computer with just a text editor.
Since these are simple text files they will be dramatically larger than the equivalent Loupe data file and can't be uploaded to Loupe.
Configuration Type | Path |
---|---|
App.Config File (xml) | gibraltar.exportFile |
Environment Variable Prefix | Loupe__ExportFile |
Option | Description | Default Value | Required |
---|---|---|---|
enabled | When true, log messages will be recorded to a local text file in the folder | false | false |
folder |
The folder to store text files. A child directory for each product will be made relative to this directory. If no directory is specified, the export file will be disabled. |
"" | true |
autoFlushInterval |
The maximum number of seconds data can be held in memory before it is flushed to disk. In addition to the automatic flush due to the amount of information waiting to be written out the messenger will automatically flush to disk based on the number of seconds specified. |
15 | false |
indexUpdateInterval |
The number of seconds between index updates. An index is maintained of session information including the number and types of messages and session status. It is updated automatically when a session is stopped and in certain other cases. This setting will control how often updates are published outside of these cases. |
15 | false |
maxFileSize |
The maximum number of megabytes in a single file before a new file is started. When the file reaches the maximum size it will be closed and a new file started. Due to compression effects and other data storage considerations, final files may end up slightly larger on disk or somewhat smaller. Setting to zero will allow files to grow to the maximum size allowed by the file format (1 GB) or the maxLocalDiskUsage, whichever is less. |
20 | false |
maxFileDuration |
The maximum number of minutes in a single file before a new file is started. When the file reaches the maximum age it will be closed and a new file started. Setting to zero will allow the file to cover an unlimited period of time. |
1440 | false |
enableFilePruning |
When true, files will be pruned for size or age. By default, files older than a specified number of days are automatically deleted and the oldest files are removed when the total storage of all files for the application exceeds a set value. Setting this option to false will disable all pruning. |
true | false |
maxLocalDiskUsage |
The maximum number of megabytes for all files for the current application on the local drive before older files are purged. When the maximum local disk usage is approached, files are purged by selecting the oldest files first. This limit may be exceeded temporarily by the maximum file size because the active file will not be purged. Size is specified in megabytes. Files are purged first by looking for the oldest sessions and then the oldest file fragments for an active session if necessary. |
150 | false |
maxLocalFileAge |
The maximum number of days that session files for the current application are retained. Session files that were closed longer than the retention interval ago will be removed regardless of space constraints. |
90 | false |
minimumFreeDisk |
The minimum amount of free disk space in megabytes on the session destination drive for any logging to be performed. If the amount of free disk space falls below this value, existing session files will be removed to free space. If no more session files are available, recording will stop until adequate space is available. Size is specified in megabytes. |
50 | false |
forceSynchronous |
When true, all writes will be performed synchronously. This will ensure they are committed to disk before the next message is processed. This can affect the degree of parallelism of a multithreaded application and throughput, so is generally only set in cases when the application is crashing during startup or other hard to catch scenarios. |
false | false |
maxQueueLength |
The maximum number of queued messages waiting to be written to disk. Once the total number of messages waiting to be written exceeds the maximum queue length the log writer will switch to a synchronous mode to catch up. This will not cause the application to experience synchronous logging behavior unless the publisher queue is also filled. |
2000 | false |
Export File Configuration |
Copy Code
|
---|---|
<configuration> <configSections> <sectionGroup name="gibraltar"> <section name="exportFile" type="Gibraltar.Agent.ExportFileElement, Gibraltar.Agent" /> </sectionGroup> </configSections> <gibraltar> <exportFile enabled="true" folder="C:\Data\Logs" /> </gibraltar> </configuration> |
Environment Configuration |
Copy Code
|
---|---|
Loupe__ExportFile__Enabled=True Loupe__ExportFile__Folder=C:\Data\Logs |
For more information on how these parameters work together to control session file pruning see Developer's Guide - Session File Pruning.