Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRestructure initialization setup #230
Conversation
sfackler
reviewed
Oct 1, 2017
| /// } | ||
| /// | ||
| /// fn try_init() -> Result<(), SetLoggerError> { | ||
| /// log::try_set_logger(|max_log_level| { |
This comment has been minimized.
This comment has been minimized.
sfackler
Oct 1, 2017
Author
Member
Both this example and the one below were ignoring the result of try_set_logger....
sfackler
force-pushed the
sfackler:default-no-std
branch
from
f5a4e50
to
057c15c
Oct 1, 2017
sfackler
force-pushed the
sfackler:default-no-std
branch
from
057c15c
to
dc11b85
Oct 1, 2017
alexcrichton
merged commit 4144cf6
into
rust-lang-nursery:master
Oct 4, 2017
This comment has been minimized.
This comment has been minimized.
|
Sounds great to me! |
This comment has been minimized.
This comment has been minimized.
meh
commented
Oct 4, 2017
|
What's the rationale behind disabling Took me a while to find I had to enable something to get |
sfackler
deleted the
sfackler:default-no-std
branch
Oct 4, 2017
This comment has been minimized.
This comment has been minimized.
|
The vast majority of consumers of log don't need to use it, so we're making their lives easier at the expense of the much smaller set of consumers that call |
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.
sfackler commentedOct 1, 2017
try_set_logger_raw is now set_logger and try_set_logger is now
set_boxed_logger. The use_std feature is now disabled by default. The
old set_logger has been removed.
When we did the crate evaluation for log, we wanted to add more variants
of set_logger that e.g. panicked by default, but I'm no longer convinced
that's a good idea. There are going to be very few instances of actually
calling these methods explicitly, since each logger implementation
should be providing their own init method that calls them. Having a huge
constellation of functions that all do basically the same thing just
makes things really confusing. We also don't want to encourage logger
implementations to only provide an init function that panics because a
common way of working with logging in tests is to try to init the system
in each test and ignore the result.
r? @alexcrichton