Skip to content

[Feature] Enum logging #20

@oh-yes-0-fps

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);
  }

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