default to "logs" dir for pulse if not provided

This commit is contained in:
Jonathan Shook 2024-01-18 00:23:18 -06:00
parent 27894fd8c5
commit 37dd11c344

View File

@ -42,7 +42,7 @@ public class ComponentPulse extends UnstartedPeriodicTaskComponent {
LastReport.OnInterrupt
);
this.pulseOf = pulseOf;
String logsdir = getComponentProp("logsdir").orElseThrow();
String logsdir = getComponentProp("logsdir").orElse("logs");
String labelElement = pulseOf.getLabels().valueOf(fileNameLabel);
this.hbpath = Path.of(logsdir).resolve(labelElement +"_status.yaml");
this.linkpath = Path.of(logsdir).resolve("status.yaml");