Log Format Selection
As a user, I want to choose between JSON and XML as the format for my daily log files, So that I can integrate EasySave logs into my enterprise tooling without upgrading to v2.0.
Given the user opens the settings menu,
When they navigate to the "Log Format" section,
Then both "JSON" and "XML" are presented as selectable options.
Given the user selects "XML" as the log format and confirms,
When the next backup job runs,
Then all log entries are written in well-formed XML to the daily log file.
Given the user selects "JSON" as the log format and confirms,
When the next backup job runs,
Then all log entries are written in JSON format, backward-compatible with the v1.0 log structure.
Given log entries are written in XML format,
When the file is opened in a basic text editor,
Then the XML is properly indented and human-readable.
Given the user switches from XML to JSON mid-project,
When the change is saved,
Then only new log files created after the change use JSON; existing XML log files are left untouched.
Given the user has selected "XML" as the log format,
When the application is closed and reopened,
Then the log format is restored from settings.json and XML is still active without any user action.
Given settings.json is missing or does not contain the log format key,
When the application starts,
Then it defaults to JSON format and proceeds normally without crashing.