Add json file rotation option (#9783)

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Jonathan Bennett
2026-03-06 10:24:32 -06:00
committed by GitHub
co-authored by GitHub Ben Meadors
parent 86dad90573
commit 0ed537a336
4 changed files with 29 additions and 1 deletions
+4
View File
@@ -165,6 +165,7 @@ extern struct portduino_config_struct {
bool ascii_logs_explicit = false;
std::string JSONFilename;
int JSONFileRotate = 0;
meshtastic_PortNum JSONFilter = (_meshtastic_PortNum)0;
// Webserver
@@ -472,6 +473,9 @@ extern struct portduino_config_struct {
out << YAML::Key << "TraceFile" << YAML::Value << traceFilename;
if (JSONFilename != "") {
out << YAML::Key << "JSONFile" << YAML::Value << JSONFilename;
if (JSONFileRotate != 0)
out << YAML::Key << "JSONFileRotate" << YAML::Value << JSONFileRotate;
if (JSONFilter == meshtastic_PortNum_TEXT_MESSAGE_APP)
out << YAML::Key << "JSONFilter" << YAML::Value << "textmessage";
else if (JSONFilter == meshtastic_PortNum_TELEMETRY_APP)