Skip to content

proxy/handler: send logs via the rust log crate#48334

Merged
jkarneges merged 1 commit intomainfrom
jkarneges/cpp-rust-log
Apr 28, 2026
Merged

proxy/handler: send logs via the rust log crate#48334
jkarneges merged 1 commit intomainfrom
jkarneges/cpp-rust-log

Conversation

@jkarneges
Copy link
Copy Markdown
Member

@jkarneges jkarneges commented Apr 28, 2026

Currently, when calling C++ code from Rust, any logging performed by the C++ code won't behave properly unless the C++ logger is also initialized. We have similar problems going the other direction. This PR attempts to consolidate all logging from either language to use the Rust logger by:

  • Adding FFI functions for initializing the Rust logger and writing messages to it.
  • Updating the C++ logging functions to write log messages to the Rust logger if it has been initialized.
  • Updating proxy and handler to initialize the Rust logger at startup instead of the C++ logger.

If the Rust logger is not initialized then the C++ logging functions will behave based on the C++ logger configuration. The only programs left doing this are the legacy runner and m2adapter, which are deprecated.

@jkarneges jkarneges force-pushed the jkarneges/cpp-rust-log branch from 69ec35a to c94b135 Compare April 28, 2026 21:21
@jkarneges jkarneges requested a review from a team April 28, 2026 21:41
@jkarneges jkarneges merged commit 902f5fb into main Apr 28, 2026
19 checks passed
@jkarneges jkarneges deleted the jkarneges/cpp-rust-log branch April 28, 2026 22:41
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