Add json file rotation option (#9783)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
co-authored by
GitHub
Ben Meadors
parent
86dad90573
commit
0ed537a336
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user