Logging Settings
From v2.0.0.
The optional logging section of the settings file sets the log directory, the size, number and age of the log files, and the log level of the console and of each logger. A key that is absent keeps the LumiScan VGR default, so "logging": {"level": "DEBUG"} changes only the level. The schema of the section is logging.schema.json.
"logging": {
"logDir": "",
"level": "INFO",
"flushLevel": "INFO",
"duplicateFilterSeconds": 600,
"console": { "enabled": true, "stream": "STDOUT" },
"file": { "enabled": true, "dailyDirectories": true, "maxFileSizeMb": 5, "maxFiles": -1, "retentionDays": 30 },
"loggers": {
"ProcessResult": { "level": "DEBUG", "file": { "maxFiles": 5, "retentionDays": 15 } }
}
}
| Key | Meaning |
|---|---|
|
The top-level folder of all log files. Empty: |
|
|
|
Identical messages in a row are dropped for this many seconds; |
|
|
|
|
|
The size at which a file is rotated, and the number of files kept per logger (per day with |
|
Logs older than this many days are deleted. |
|
Settings of single loggers by name: |
Every folder named YYYY-MM-DD in logDir counts as a log day and is deleted when it is older than retentionDays. Do not use the folder for other data.
|
Overriding the Settings File
The same keys can be set by the user in %LOCALAPPDATA%\HD Vision Systems GmbH\LumiScan VGR\logging.json and, for one run, by environment variables. These override the settings file, in this order (highest first):
-
HDV_LOG_LEVELandHDV_LOG_FLUSH_LEVEL: the level and the flush level of all loggers. -
HDV_LOG_LEVELS(for exampleProcessResult=trace,Deprecated=warn) and<LOGGER>_LOG_LEVEL: single loggers.HDV_LOG_DIRsets the folder. -
The user file
logging.json, or the file named byHDV_LOG_CONFIG. -
The
loggingsection of the settings file, then the LumiScan VGR defaults.
The settings are read when LumiScan VGR starts; a change takes effect after a restart. The first lines of a start, before the settings file is read, are written with the defaults.
The loggers of LumiScan VGR are also used by the camera library and the camera plugins, so their messages follow these settings and are in the same log files. Only the LumiScanAPI log, which the LumiScan API keeps for itself in <HDVAppData>\LumiScanAPI\logs, ignores them.
|