Skip to main content

Logging

linqi supports different targets for logging. These can be configured via the appsettings.json file.
To adjust logging settings, follow these steps:

  • Open the file appsettings.json (default path on Windows C:\inetpub\wwwroot\linqi\appsettings.json) inside the linqi installation folder with a text editor.
  • Adjust the logging settings in the Log section:
    • LogLevel:
      This value defines how much should be logged. You can use the following levels:
      • None:
        Nothing will be logged.
      • Error:
        Only errors will be logged.
      • Warn:
        Errors and warnings will be logged.
      • Information: Errors, warnings, and informational messages will be logged.
    • ActiveLoggers: This value defines which logging targets will be used. Multiple targets must be separated by semicolons.
      More information can be found below.
    • LogRequestTimings:
      This boolean value defines whether individual requests should be logged.
      Not every logging target supports request logging.
    • LogDependenciesTimings:
      This boolean value defines whether dependencies to third-party systems should be logged.
      This allows you to measure access times to the database as well as external systems.
      Not every logging target supports logging dependencies.
    • LogParameterValues:
      This boolean value defines whether individual parameters of logged requests should also be logged.
    • LogFlushIntervalMinutes:
      For performance reasons, some logging systems don’t transmit every log entry immediately but in batches at fixed intervals.
      This numeric value defines how many minutes are waited between transmissions.

Logging Targets

This section shows which logging targets are supported by linqi and how they can be configured.
The key always represents the value you must enter under ActiveLoggers to activate the target.

Text Files

Key: TextFile

This target writes log files into a configurable folder.
A daily rolling log file will be created.

As configuration, you can define the folder using the string value TextFileLogFolder in the Log block of the appsettings.json file.
If this value is not specified, a subfolder logs will be created inside the linqi folder, and logs will be written there.

CSV

Key: Csv

This target writes CSV files into a configurable folder.
A daily rolling log file will be created.

As configuration, you can define the folder using the string value TextFileLogFolder in the Log block of the appsettings.json file.
If this value is not specified, a subfolder logs will be created inside the linqi folder, and logs will be written there.

Application Insights

Key: ApplicationInsight

This target writes data to Microsoft Application Insights.

For configuration, you must create a block ApplicationInsight inside the Log block.
Inside this block, the following properties are available:

  • ConnectionString:
    Enter the connection string for Application Insights.

Influx

Key: Influx

This target writes data to an InfluxDB.
For configuration, you must create a block Influx inside the Log block.
Inside this block, the following properties are available:

  • Url:
    Enter the URL to the HTTP API endpoint of the Influx database.
  • DbName:
    Enter the name of the database.
  • LogHost:
    Enter the name of the server being logged. This helps narrow down issues more quickly.
  • User:
    Enter the username used to log into the Influx database.
  • Password:
    Enter the encrypted password used to log into the Influx database.

Windows Event Log

Key: WindowsEventLog

This target writes logs to the Windows Event Log.
The source name used is linqi.

No further configuration is required for this target.

info

The user under which the application pool runs must have the right to write to the Windows Event Log and to create a source.

This logging target is only supported on Windows.