Skip to content

Document Logger.hpp: Add Doxygen documentation for Logger class and macros#2

Draft
Copilot wants to merge 4 commits into2027from
copilot/document-logger
Draft

Document Logger.hpp: Add Doxygen documentation for Logger class and macros#2
Copilot wants to merge 4 commits into2027from
copilot/document-logger

Conversation

Copy link

Copilot AI commented Jan 16, 2026

  • Explore repository structure and understand documentation style
  • Examine Logger.hpp and identify undocumented elements
  • Understand build and linting requirements (wpiformat, clang-tidy)
  • Document the LogLevel enum and its constants
  • Document the Logger class
  • Document Logger constructor and methods
  • Document the WPI_LOG macro and helper macros (WPI_ERROR, WPI_WARNING, etc.)
  • Run wpiformat to ensure proper formatting
  • Push changes to document-logger branch
  • Address review feedback:
    • Update DoLog documentation wording
    • Update LogV documentation to use "a format string"
    • Change format parameter description to "Format string"
    • Move example from WPI_LOG macro to class-level documentation
    • Add notes to DoLog and LogV about using macros instead
  • Apply review changes consistently:
    • Update Log template function to use "a format string"
    • Change all format parameters from "Format string (fmt syntax)" to "Format string"
    • Update all logging macros (WPI_LOG, WPI_ERROR, WPI_WARNING, WPI_INFO, WPI_DEBUG, WPI_DEBUG1-4)
Original prompt

On Logger.hpp, Document the wpiutil Logger class and associated constants and macros, following the existing code and documentation style. Push to a new branch called document-logger and wait for github actions CI results.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: rzblue <13878527+rzblue@users.noreply.github.com>
Copilot AI changed the title [WIP] Document wpiutil Logger class and related constants and macros Document Logger.hpp: Add Doxygen documentation for Logger class and macros Jan 16, 2026
Copilot AI requested a review from rzblue January 16, 2026 16:01
const char* msg);

/**
* Logs a formatted message using fmt format string.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Logs a formatted message using fmt format string.
* Logs a formatted message using a format string.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to "Logs a formatted message using a format string." in 8b5d358

* @param level Log level
* @param file Source file name
* @param line Line number in source file
* @param format Format string (fmt syntax)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param format Format string (fmt syntax)
* @param format Format string

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to "Format string" in 8b5d358

*
* Example:
* @code
* Logger logger{[](unsigned int level, const char* file, unsigned int line,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the example here, put it in the class level documentation

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved example to class level documentation in 8b5d358

/**
* Logs a message.
*
* This is the core logging function that calls the registered logger
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* This is the core logging function that calls the registered logger
* This is the main logging function that calls the registered logger

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to "This is the main logging function that calls the registered logger" in 8b5d358

/**
* Logs a message.
*
* This is the core logging function that calls the registered logger
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add note to both this and LogV that users should generally use the log macros instead

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added @note to both DoLog and LogV about using the log macros instead in 8b5d358

Co-authored-by: rzblue <13878527+rzblue@users.noreply.github.com>
Copilot AI requested a review from rzblue January 16, 2026 16:16
@rzblue
Copy link
Owner

rzblue commented Jan 16, 2026

@copilot Any changes suggested in the last review should be applied to other functions if applicable

…ions and macros

Co-authored-by: rzblue <13878527+rzblue@users.noreply.github.com>
Copy link
Author

Copilot AI commented Jan 16, 2026

@copilot Any changes suggested in the last review should be applied to other functions if applicable

Applied the format string documentation changes consistently to:

  • Log template function (line 141, 150)
  • WPI_LOG macro (line 188)
  • All logging convenience macros: WPI_ERROR, WPI_WARNING, WPI_INFO, WPI_DEBUG, WPI_DEBUG1-4 (lines 201, 211, 221, 231, 241, 251, 261, 271)

Changed "fmt format string" to "a format string" and "Format string (fmt syntax)" to "Format string" throughout. See commit dac3c25

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants