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
fix(test): test clients should log to data_dir #813
Merged
joshuef
merged 5 commits into
maidsafe:main
from
RolandSherwin:improve_test_client_logs
Oct 11, 2023
Merged
fix(test): test clients should log to data_dir #813
joshuef
merged 5 commits into
maidsafe:main
from
RolandSherwin:improve_test_client_logs
Oct 11, 2023
Conversation
This file contains 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
RolandSherwin
force-pushed
the
improve_test_client_logs
branch
2 times, most recently
from
October 9, 2023 11:23
21a1b0b
to
bebee1a
Compare
Reviewpad Report
|
let log_guard = tracing_subscriber::registry() | ||
.with(layers.layers) | ||
.set_default(); | ||
// this is the test_name and not the test_file_name; TODO: should try passing as logging's target filter |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
Suspicious comment
RolandSherwin
force-pushed
the
improve_test_client_logs
branch
2 times, most recently
from
October 9, 2023 14:06
c5dd013
to
5b2124d
Compare
grumbach
approved these changes
Oct 10, 2023
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.
LGTM
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Oct 10, 2023
RolandSherwin
force-pushed
the
improve_test_client_logs
branch
from
October 10, 2023 13:11
2445500
to
077aba3
Compare
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Oct 10, 2023
- the log file is empty if the guard is dropped
- if test-threads=1, only the logs from the test that calls init_logging() first are written - this is because of the use of Once::new() during init_logging for tests
RolandSherwin
force-pushed
the
improve_test_client_logs
branch
from
October 10, 2023 20:15
077aba3
to
e93fcdd
Compare
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Oct 11, 2023
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.
Description
Summary generated by Reviewpad on 09 Oct 23 09:43 UTC
This pull request includes changes to multiple files. Here is a summary of the diff:
storage_payments.rs
:init_logging()
that initializes logging to the data directory.SN_LOG
environment variable is provided and overrides the logging targets accordingly.data_dir/safe/client/logs
.stdout
.init_logging()
is called multiple times in different test functions.msgs_over_gossipsub.rs
:common::safenode_proto
tocrate::common::safenode_proto
.sn_node::NodeEvent
to a different location.NodeEvent
type from thesn_node
module.eyre::Result
.init_logging
function from thecommon
module.init_logging
function from thesn_logging
module.Level
type from thetracing_core
module.init_logging
function.data_availability_during_churn
test function.sequential_transfers.rs
:mod common
,use sn_transfers::NanoTokens
).common::{get_client_and_wallet, get_wallet, init_logging}
to a different location.sn_client::send
andsn_transfers::{create_offline_transfer, rng, Hash, UniquePubkey}
.cash_note_transfer_multiple_sequential_succeed
as an async function.verify_data_location.rs
:verify_data_location
.tmp_dir
.logging_targets
with a call toinit_logging
.churn_count
.nodes_rewards.rs
:init_logging()
before the test functionnodes_rewards_for_storing_chunks()
.nodes_rewards_for_storing_registers()
that includes a call toinit_logging()
.nodes_rewards.rs
.Please review these file diffs and ensure they meet the requirements of the code.