Skip to content

add wpi log absl hook#137

Open
charliehuang09 wants to merge 3 commits intomainfrom
add-absl-wpi-hook
Open

add wpi log absl hook#137
charliehuang09 wants to merge 3 commits intomainfrom
add-absl-wpi-hook

Conversation

@charliehuang09
Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: Charlie Huang <charliehuang09@gmail.com>
Copilot AI review requested due to automatic review settings March 16, 2026 19:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an Abseil LogSink implementation that forwards Abseil logs into WPILib’s DataLogManager output, and wires it into the existing NetworkTables/log startup path.

Changes:

  • Introduces utils::WpiLogSink (Abseil LogSink) that appends log messages to a WPILib StringLogEntry.
  • Registers the sink during utils::StartNetworktables() so logs are captured in the WPILib data log.
  • Updates src/utils CMake target sources to compile the new sink.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/utils/wpi_log_sink.h Declares the Abseil log sink wrapper targeting WPILib datalog.
src/utils/wpi_log_sink.cc Implements the sink by appending log entries to a StringLogEntry.
src/utils/nt_utils.cc Registers the sink during startup after DataLogManager::Start().
src/utils/CMakeLists.txt Adds wpi_log_sink.cc to the utils library build.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +1 to +5
#include <frc/DataLogManager.h>
#include <networktables/StringTopic.h>
#include <wpi/DataLog.h>
#include "absl/log/log.h"
#include "absl/log/log_sink.h"
charliehuang09 and others added 2 commits March 16, 2026 12:37
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: charliehuang09 <41605449+charliehuang09@users.noreply.github.com>
Signed-off-by: Charlie Huang <charliehuang09@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants