Class NestedBackend

java.lang.Object
edu.wpi.first.epilogue.logging.NestedBackend
All Implemented Interfaces:
EpilogueBackend

public class NestedBackend extends Object implements EpilogueBackend
A backend that logs to an underlying backend, prepending all logged data with a specific prefix. Useful for logging nested data structures.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new nested backed underneath another backend.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets a backend that can be used to log nested data underneath a specific path.
    void
    log(String identifier, boolean value)
    Logs a boolean data point.
    void
    log(String identifier, boolean[] value)
    Logs a boolean array data point.
    void
    log(String identifier, byte[] value)
    Logs a raw byte array data point.
    void
    log(String identifier, double value)
    Logs a 64-bit floating point data point.
    void
    log(String identifier, double[] value)
    Logs a 64-bit floating point array data point.
    void
    log(String identifier, float value)
    Logs a 32-bit floating point data point.
    void
    log(String identifier, float[] value)
    Logs a 32-bit floating point array data point.
    void
    log(String identifier, int value)
    Logs a 32-bit integer data point.
    void
    log(String identifier, int[] value)
    Logs a 32-bit integer array data point.
    void
    log(String identifier, long value)
    Logs a 64-bit integer data point.
    void
    log(String identifier, long[] value)
    Logs a 64-bit integer array data point.
    void
    log(String identifier, String value)
    Logs a text data point.
    void
    log(String identifier, String[] value)
    Logs a string array data point.
    <S> void
    log(String identifier, S[] value, Struct<S> struct)
    Logs an array of struct-serializable objects.
    <S> void
    log(String identifier, S value, Struct<S> struct)
    Logs a struct-serializable object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface edu.wpi.first.epilogue.logging.EpilogueBackend

    lazy, log, log, log, log, log
  • Constructor Details

    • NestedBackend

      public NestedBackend(String prefix, EpilogueBackend impl)
      Creates a new nested backed underneath another backend.
      Parameters:
      prefix - the prefix to append to all data logged in the nested backend
      impl - the backend to log to
  • Method Details

    • getNested

      Description copied from interface: EpilogueBackend
      Gets a backend that can be used to log nested data underneath a specific path.
      Specified by:
      getNested in interface EpilogueBackend
      Parameters:
      path - the path to use for logging nested data under
      Returns:
      the nested backend
    • log

      public void log(String identifier, int value)
      Description copied from interface: EpilogueBackend
      Logs a 32-bit integer data point.
      Specified by:
      log in interface EpilogueBackend
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      public void log(String identifier, long value)
      Description copied from interface: EpilogueBackend
      Logs a 64-bit integer data point.
      Specified by:
      log in interface EpilogueBackend
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      public void log(String identifier, float value)
      Description copied from interface: EpilogueBackend
      Logs a 32-bit floating point data point.
      Specified by:
      log in interface EpilogueBackend
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      public void log(String identifier, double value)
      Description copied from interface: EpilogueBackend
      Logs a 64-bit floating point data point.
      Specified by:
      log in interface EpilogueBackend
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      public void log(String identifier, boolean value)
      Description copied from interface: EpilogueBackend
      Logs a boolean data point.
      Specified by:
      log in interface EpilogueBackend
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      public void log(String identifier, byte[] value)
      Description copied from interface: EpilogueBackend
      Logs a raw byte array data point. NOTE: serializable data should be logged using EpilogueBackend.log(String, Object, Struct).
      Specified by:
      log in interface EpilogueBackend
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      public void log(String identifier, int[] value)
      Description copied from interface: EpilogueBackend
      Logs a 32-bit integer array data point.
      Specified by:
      log in interface EpilogueBackend
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      public void log(String identifier, long[] value)
      Description copied from interface: EpilogueBackend
      Logs a 64-bit integer array data point.
      Specified by:
      log in interface EpilogueBackend
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      public void log(String identifier, float[] value)
      Description copied from interface: EpilogueBackend
      Logs a 32-bit floating point array data point.
      Specified by:
      log in interface EpilogueBackend
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      public void log(String identifier, double[] value)
      Description copied from interface: EpilogueBackend
      Logs a 64-bit floating point array data point.
      Specified by:
      log in interface EpilogueBackend
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      public void log(String identifier, boolean[] value)
      Description copied from interface: EpilogueBackend
      Logs a boolean array data point.
      Specified by:
      log in interface EpilogueBackend
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      public void log(String identifier, String value)
      Description copied from interface: EpilogueBackend
      Logs a text data point.
      Specified by:
      log in interface EpilogueBackend
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      public void log(String identifier, String[] value)
      Description copied from interface: EpilogueBackend
      Logs a string array data point.
      Specified by:
      log in interface EpilogueBackend
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
    • log

      public <S> void log(String identifier, S value, Struct<S> struct)
      Description copied from interface: EpilogueBackend
      Logs a struct-serializable object.
      Specified by:
      log in interface EpilogueBackend
      Type Parameters:
      S - the serializable type
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
      struct - the struct to use to serialize the data
    • log

      public <S> void log(String identifier, S[] value, Struct<S> struct)
      Description copied from interface: EpilogueBackend
      Logs an array of struct-serializable objects.
      Specified by:
      log in interface EpilogueBackend
      Type Parameters:
      S - the serializable type
      Parameters:
      identifier - the identifier of the data point
      value - the value of the data point
      struct - the struct to use to serialize the objects