Class ClassSpecificLogger<T>
java.lang.Object
org.wpilib.epilogue.logging.ClassSpecificLogger<T>
- Type Parameters:
T- the type of data supported by the logger
Base class for class-specific generated loggers. Loggers are generated at compile time by the
Epilogue annotation processor and are used at runtime for zero-overhead data logging. Users may
also declare custom loggers, annotated with
@CustomLoggerFor, for
Epilogue to pull in during compile time to use for logging third party types.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClassSpecificLogger(Class<T> clazz) Instantiates the logger. -
Method Summary
Modifier and TypeMethodDescriptionfinal voiddisable()Disables this logger.Gets the type of the data this logger accepts.final booleanChecks if this logger has been disabled.final voidreenable()Reenables this logger after being disabled.final voidtryUpdate(TelemetryTable table, T object, ErrorHandler errorHandler) Attempts to update telemetry.protected abstract voidupdate(TelemetryTable table, T object) Updates an object's fields in telemetry.
-
Constructor Details
-
ClassSpecificLogger
-
-
Method Details
-
update
Updates an object's fields in telemetry.- Parameters:
table- the telemetry table to updateobject- the object to update in the log
-
tryUpdate
Attempts to update telemetry. Will do nothing if the logger isdisabled.- Parameters:
table- the telemetry table to log data toobject- the data object to logerrorHandler- the handler to use if logging raised an exception
-
isDisabled
public final boolean isDisabled()Checks if this logger has been disabled.- Returns:
- true if this logger has been disabled by
disable(), false if not
-
disable
public final void disable()Disables this logger. Any log calls made while disabled will be ignored. -
reenable
public final void reenable()Reenables this logger after being disabled. Has no effect if the logger is already enabled. -
getLoggedType
-