Class FaultLogger
java.lang.Object
dev.doglog.internal.FaultLogger
Provides the interface for logging faults. Faults are a DogLog concept that were created prior to
WPILib alerts. Alerts are great but are NT only, so faults allow DogLog to provide a simple
interface to logging errors that writes to both NT and DataLog.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddFault(LogWriterHighLevel logger, String faultName) static voidaddFault(LogWriterHighLevel logger, String faultName, @Nullable Alert.AlertType alertType) Log a fault.static voidclearFault(LogWriterHighLevel logger, String faultName) static voiddecreaseFault(LogWriterHighLevel logger, String faultName) Remove the alert associated with a fault.static booleanstatic boolean
-
Method Details
-
addFault
-
addFault
public static void addFault(LogWriterHighLevel logger, String faultName, @Nullable Alert.AlertType alertType) Log a fault.- Parameters:
logger- LogConsumer to use.faultName- The name of the fault to log.alertType- The type of alert to create for the fault, ornullif it should not create an alert
-
decreaseFault
Remove the alert associated with a fault.- Parameters:
logger- LogConsumer to use.faultName- The name of the fault to remove.
-
clearFault
-
faultsLogged
public static boolean faultsLogged() -
faultsActive
public static boolean faultsActive()
-