Configuring Logging to the File System
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. For more information on levels, see Updating the Logging Level for VERA Server
The following is a list of all modules that support independent logging (for more information on what is being logged, see Retrieving Log Files Old):
Module Name | Default Log File Name | Recommended Minimum Level |
---|---|---|
API Jira RouteActions | vera-server-api-jira-routeactions-.txt | Information |
API qTest RouteActions | vera-server-api-qtest-routeactions-.txt | Information |
API Routes RouteEvents | vera-server-api-routes-routeevents-.txt | Information |
Connections | vera-server-connections-.txt | Information |
Database | vera-server-database-.txt | Information |
Errors | vera-server-error-.txt | Information |
Info | vera-server-info-.txt | Information |
Messages | vera-server-messages-.txt | Information |
Messages Jira | vera-server-messages-jira-.txt | Information |
Messages qTest | vera-server-messages-qtest-.txt | Information |
Messages Tosca | vera-server-messages-tosca-.txt | Information |
Migration | vera-server-migration-.txt | Information |
Users | vera-server-users-.txt | Information |
Verification | vera-server-verification-.txt | Information |
Webhooks | vera-server-webhooks-.txt | Information |
Worker Jira | vera-server-worker-jira-.txt | Information |
Worker JobService | vera-server-worker-jobservice-.txt | Information |
Worker qTest | vera-server-worker-qtest-.txt | Information |
Configuring Logging to Graylog
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. To extend logging to Graylog, add the following JSON to the appropriate log definition, ensuring the hostname and port matches your Graylog configuration:
{ "Name": "Graylog", "Args": { "hostnameOrAddress": "graylog", "port": "12201", "transportType": "Udp" } }
Example logging-settings.json File
Attached is an example configuration file that contains all possible logging files, their default logging settings, and output to both the file system and Graylog.