Unify rust & C++ logs using the Rust facilities. #92
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The choice was to write macros to replace the log crate macros, or
write templates to sink the C++ logging to Rust. I went with Rust
because what good is being in the evangelism task force if I don't
ruthlessly carcinicize?
Wrote the templates by contemplating what the SKSE peeps did to put
templates in front of
spdlog
. These templates are in front offmt
instead. The guts of each implementation routes to shims in front of
the the
log
crate's macros.The new namespace is
rlog
. All calls tologger::info()
are nowcalls to
rlog::info()
which eventually dispatches tolog::info!()
.The debug and trace level log templates add filename & line number
information to the start of each log message. Unfortunately those two
levels are decorated with fairly useless information from the rust
logger, which I can't rid of without also affecting rust-sourced log
lines. I'll need to find a new crate. This is, however, good enough
to ship.
Got rid of spdlog in the build. It remains in the deps because the
CommonLibSSE dll needs it.
Demoted some logs while I was looking at them in the unified context.
I will need to systematically review logging because it feels too
voluminous now that it's all in one file.