-
Notifications
You must be signed in to change notification settings - Fork 985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust log to core #3432
Rust log to core #3432
Conversation
062be39
to
754f1cf
Compare
{ | ||
log::set_logger(&LOGGER)?; | ||
} | ||
log::set_max_level(maxFilter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should also be getting called when Logging::setLogLevel
is called, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, any time you change anything in the logging system it gets "deinitialized" and "reinitialized" in the C++ Logging.cpp / spdlog side. That's why there's the HAVE_INITIALIZED
bool in the Rust side, to prevent multiple-initialization.
There's one open question that only impacts the rust side, not the C++ side. So I'm going to merge. |
r+ 51009b0 |
This builds on the back of #3428 by connecting the Rust standard
log
crate API to the stellar-core logging subsystem, allowing us to fairly normally writeinfo!(...)
calls in Rust and have them come out ofspdlog
.Along the way it adds a little bit of additional plumbing in the bridge module and renames C++ bridging-related files yet again (hopefully for the last time) to match our CamelCase naming convention on C++ files.