Team3256 / FRC_Programming_2023

MIT License
8 stars 0 forks source link

Create a "LogCommandBase" for automatically adding logging for when a command starts and ends #273

Closed adityapawar1 closed 1 year ago

adityapawar1 commented 1 year ago

All commands are required to extend CommandBase, so we want to create a LogCommandBase that outputs the command name when it starts and ends based on whether the debug flag in constants in true.

Here is some sample code to print the name of the command based on the name and if debug is enabled:

if (Constants.kDebugEnabled) {
      System.out.println(this.getName() + " started");
}