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 voidstatic voidaddFault(LogWriter logger, String faultName, @Nullable org.wpilib.driverstation.Alert.Level alertLevel) Log a fault.static voidclearFault(LogWriter logger, String faultName) static voiddecreaseFault(LogWriter logger, String faultName) Remove the alert associated with a fault.static booleanstatic boolean
-
Method Details
-
addFault
-
addFault
public static void addFault(LogWriter logger, String faultName, @Nullable org.wpilib.driverstation.Alert.Level alertLevel) Log a fault.- Parameters:
logger- LogConsumer to use.faultName- The name of the fault to log.alertLevel- The level of alert to create for the fault, ornullif it should not create an alert
-
clearFault
-
decreaseFault
-
faultsActive
public static boolean faultsActive() -
faultsLogged
public static boolean faultsLogged()
-