Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Production Management Web Client

Configure logging parameters in appsettings JSON file

Configure logging parameters in appsettings JSON file

  • Last UpdatedMar 01, 2023
  • 1 minute read

Configure serilog level and log retention parameters in the Web API appsettings JSON files if necessary.

To edit the appsettings files

  1. Navigate to the Web Client root installation path and modify the relevant log sections of their individual appsettings.json files.

    For example, C:\Program Files\AVEVA\AVEVA Production Management Web Client.

    • Authorization.Api

    • Configuration.Api

    • Downtime.Api

    • ShiftLog.Api

  2. For each appsettings.json file, do the following and save changes to the file.

    1. Update the serilog level based on your requirement. This indicates the minimum log level of messages to send to the logger application.

      You can select either of these options: Verbose, Debug, Information, Warning, Error, or Fatal. The default level is Warning. If you set the level to Error, the Web Client triggers the HTTPContext information logging.

      {

      "Serilog": {

      "MinimumLevel": {

      "Default": "Warning",

      "Override": {

      "Microsoft": "Warning",

      "System": "Warning"

      }

      },

    2. Update the log retention parameters or keep the default settings as shown in the following example. This example is extracted from the appsettings.json file from the DowntimeApi folder.

      "WriteTo": [

      {

      "Name": "File",

      "Args": {

      "path": "..\\Logs\\Downtime_.log",

      "rollingInterval": "Day",

      "rollOnFileSizeLimit": true,

      "fileSizeLimitBytes": 104857600, //10 MB

      "retainedFileCountLimit": 30,

      "formatter": "Serilog.Formatting.Json.JsonFormatter, Serilog"

      }

      }

TitleResults for “How to create a CRG?”Also Available in