Skip to content
This repository was archived by the owner on May 26, 2019. It is now read-only.

Logging Standards

AMMack26 edited this page Feb 6, 2016 · 30 revisions

When to Log

  • Initialization of a Command
  • Command interruption
  • Subsystem methods
  • The execute function of a Command when it doesn't repeat

When Not to Log

  • The execute function of a Command when it constantly repeats

How to Log

  1. Add logger to top of class file like below. Replace with the class name.
    Logger logger = Robot.getLogger(<Class>.class);
  2. Use logger by calling the logger.info() or logger.fine() methods.
    Example Initializing log statement in the initialize method of a Command:
    logger.info("[Initializing: <ClassName>]");
  3. Use appropriate log level
  • Use logger.fine for all subsystem classes.
  • Use logger.info for all command classes.

Clone this wiki locally