Updating the Logging Level for VERA Server

The messages log for VERA Server can be configured to various logging levels in order to filter messages based on urgency. To set the logging level, the following steps must be taken:

  1. Create/Edit the system environment variable for VERA_SERVER_LOG_LEVEL
  2.  The variable value can be set to any of the levels in the table below.
    1. By default, the logging level will be set to INFO. This means that if the environment variable is not configured at all or contains a value not supported by VERA as shown in the table below, the INFO logging level will be used.
LevelDescription
INFOAn informational listing of messages between the VERA API and external consumers.
FULLA verbose listing of all internal and external messages along with their payloads for VERA Server.
NONEDisables all logging for VERA server messages

Additional Logging and Controls

VERA Server provides troubleshooting information through several log files and logging levels within those files.

Log NameLog FileDescriptionLog LevelIncluded Information
Infovera-server-infoLogs provided by ASP.Net CoreInformationAll logging provided by ASP.Net Core
Errorsvera-server-errorsErrors and Exceptions encountered during processingErrorErrors and Exceptions
Databasevera-server-databaseMongoDB database interactionsError

Connection Failed

Command Failed




Information

Connection Created

Connection Opened

Connection Closed




Debug

Connection Opening

Connection Closing

Command Started

Command Succeeded

Messagesvera-server-messagesPrimary External and Internal MessagingInformation

Messaging according to the VERA_SERVER_LOG_LEVEL environment variable as described above.

Messages qTestvera-server-messages-qtestMessaging between VERA and the qTest APIInformationRequest and response at qTest API endpoints



DebugPayloads with the qTest API messages
Messages Jiravera-server-messages-jiraMessaging between VERA and the Jira APIInformationRequest and response at Jira API endpoints



DebugPayloads with the qTest API messages

Log Levels

The supported log levels from least information to most is:

  1. Fatal
  2. Error
  3. Warning
  4. Information
  5. Debug
  6. Verbose

Each lower level includes everything from the levels above it.

By default, all levels are set to Information.

Log Locations and File Processes

By default, logs are written to the Logs folder off of the path specified in the VERA_SERVER_DATA_DIR environment variable.

Files roll by a combination of date and size.

By default, log files are rolled by day with a size limit of 1Gb and the latest 31 log files kept in raw form. Older log files are compressed using GZIP compression.

Filenames follow this structure:

BaseLogFile-YYYYmmDD( xxx).txt(.gz) 

For example: vera-server-messages-20220824 001.gz

Configuring Logging

Logging settings can be modified via a "logging-settings.json" file in the Configs folders off of the path specified in the VERA_SERVER_DATA_DIR environment variable.

This is a JSON file with settings for each Log file. Configuration of a particular log can be done by adding an appropriate section to the file. Configuration that matches the defaults is as follows using the Messages log as the example:

 "Messages": {
      "MinimumLevel": "Information",
      "WriteTo": [
        { "Name": "File",
          "Args": {
            "path": "%VERA_SERVER_DATA_DIR%/Logs/vera-server-messages-.txt",
            "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message}{NewLine}",
            "rollingInterval": "Day",
            "rollOnFileSizeLimit": true,
            "hooks": "Vera.Logging.SerilogHooks::ArchiveHooks, Vera.Logging"
          }
        }
      ]
    }

The most important configuration point is the MinimumLevel which is where the level is set for that log.
Other options can be configured to control the retention and size of logs.