Class FaultLogger

java.lang.Object
dev.doglog.internal.FaultLogger

@ThreadSafe public class FaultLogger extends Object
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 Details

    • addFault

      public static void addFault(LogWriter logger, String faultName)
    • 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, or null if it should not create an alert
    • clearFault

      public static void clearFault(LogWriter logger, String faultName)
    • decreaseFault

      public static void decreaseFault(LogWriter logger, String faultName)
      Remove the alert associated with a fault.
      Parameters:
      logger - LogConsumer to use.
      faultName - The name of the fault to remove.
    • faultsActive

      public static boolean faultsActive()
    • faultsLogged

      public static boolean faultsLogged()