-
Couldn't load subscription status.
- Fork 69
Description
Describe the bug
Depending on order of waitInSeconds property, configuration file is parsed as valid or invalid.
To Reproduce
Steps to reproduce the behavior:
-
Create
nonworking.jsonwithwaitInSecondsordered this way:{ "LogConfig": { "sources": [ { "type": "File", "filter": "*.log", "directory": "C:\\data\\Logs", "waitInSeconds": 0, "includeSubdirectories": false, "includeFileNames": false } ] } } -
Run
C:\LogMonitor.exe /config C:\nonworking.jsonan observe parsing error[2025-07-10T22:17:01.000Z][LOGMONITOR] ERROR: Failed to read json configuration file. JsonFileParser: Error at end of an object. [2025-07-10T22:17:01.000Z][LOGMONITOR] ERROR: Invalid configuration file.
-
Create
working.jsonwithwaitInSecondsmoved to the end of the object:{ "LogConfig": { "sources": [ { "type": "File", "filter": "*.log", "directory": "C:\\data\\Logs", "includeSubdirectories": false, "includeFileNames": false, "waitInSeconds": 0 } ] } } -
Run
C:\LogMonitor.exe /config C:\working.jsonan observe all working[2025-07-10T22:15:42.000Z][LOGMONITOR] ERROR: Error in log file monitor. Failed to query file information. File: \\?\C:\data\Logs\seq-20250710.log. Error: 50 [2025-07-10T22:15:42.000Z][LOGMONITOR] ERROR: Error in log file monitor. Failed to query file information. File: \\?\C:\data\Logs\seq-20250710.log. Error: 50
(Those
ERROR-s annoyance is benign, see Getting ERROR: Error in log file monitor. Failed to query file information [BUG] #125 (comment))
Expected behavior
The nonworking.json successfully parsed as a valid JSON.
Screenshots
n/a
Configuration
-Tool: Log Monitor
-Version: 2.1.1 (latest)
Additional context
n/a