Repository navigation
[WIP] include std::log output in tracing output - #584
Closed
nothingmuch wants to merge 1 commit into
Closed
nothingmuch wants to merge 1 commit into
nothingmuch wants to merge 1 commit into
Conversation
Collaborator
Pull Request Test Coverage Report for Build 13890527789Details
💛 - Coveralls |
DanGould
force-pushed
the
log-in-tracing
branch
from
March 17, 2025 02:52
cf4a43e to
871df41
Compare
Uses the tracing-log dependency, which is already in the tree due to tracing-subscriber
Member
|
diff --git a/Cargo-minimal.lock b/Cargo-minimal.lock index ca59ec8..7848e9b 100644
--- a/Cargo-minimal.lock
+++ b/Cargo-minimal.lock
@@ -1689,6 +1689,7 @@ dependencies = [
"testcontainers-modules",
"tokio",
"tracing",
+ "tracing-log",
"tracing-subscriber",
"url",
]
diff --git a/Cargo-recent.lock b/Cargo-recent.lock
index ca59ec8..7848e9b 100644
--- a/Cargo-recent.lock
+++ b/Cargo-recent.lock
@@ -1689,6 +1689,7 @@ dependencies = [
"testcontainers-modules",
"tokio",
"tracing",
+ "tracing-log",
"tracing-subscriber",
"url",
]had to add tracing-log to the dependency list in the lock file |
Member
|
wait this is just a test dependency cACK this makes total sense, already a dev dep. |
Contributor
|
@nothingmuch Is there anything blocking this? Is this related to #916 ? |
Contributor
Author
|
I would prefer to just switch to |
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
with the default options, which we use, the tracing-subscriber crate already includes tracing-log as a dependency, so might as well enable the std::log event bridge
opening as a draft primarily to document how this can be done at least crudely. afaict it would be better to have init_tracing return a guard per thread instead of a setting the global in a
Once, and use theSubscriberInitExtextension trait'sset_default, which would make our tests dolet _guard = init_tracing()everywhere.that's kind of what actually wanted which is to use the tracing-chrome crate so i can look at spans more graphically, still trying to figure out how to save these only if tests fail, or as an alternative set one up for all tests somehow and maybe use
#instrumentto add a span for per test, or just record them all but only if some env var is set (I would like to have them as downloadable artifacts in github CI jobs)