Skip to content

[Feature] Enum logging #20

Description

@oh-yes-0-fps

We could allow implicit logging of enum types through annotations, Logged classes and any other way we publish data.

There are 2 approaches:

  • We generate a WPILib serializable struct on-the-fly for the enum using reflection and keep track of it as to not republish (not sure how possible this is)
  • We just log it as the name of the enum variant as a String

Example of what it would look like in Logged

  public default <E extends Enum<?>> void log(String key, E value, LogLevel level) {
    Monologue.ntLogger.put(getFullPath() + "/" + key, value.name(), level);
  }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions