15 Commits

Author SHA1 Message Date
David Tolnay
ce64c06a37
Format with rustfmt 2019-02-14 2019-03-09 16:15:10 -08:00
David Kellum
9b48836440 Move max_level_features project out of tests to avoid warning
fixes: #270
2019-02-01 16:35:01 -08:00
Steven Fackler
b1b5196775 Remove MaxLevelFilter in favor of a simple function
Closes #243
2017-12-05 21:22:22 -08:00
Steven Fackler
dc11b85c07 Restructure initialization setup
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.
2017-09-30 21:31:07 -07:00
Alisha
308e6f33d6 Change set_logger_raw to try_set_logger_raw 2017-08-18 00:56:29 +10:00
dan pittman
44bbdbd93b
removes shutdown and adds flush to Log trait.
Signed-off-by: dan pittman <danielscottt@gmail.com>
2017-07-17 08:38:02 -07:00
Alisha
a1e0bcacef set_logger panics on error 2017-06-22 10:53:05 +10:00
David Tolnay
473aa60a92
Run rustfmt 2017-05-29 20:58:11 -07:00
David Tolnay
07d3e7df6e
Disable publishing the breaking changes 2017-05-23 16:18:55 -07:00
Ottavio Hartman
d4748011fa Removed "stuttering" of types, like LogLevel -> Level.
The affected enums, structs, and functions include:
- LogLevel
- LogLevelFilter
- LogRecord
- LogMetadata
- LogLocation
- MaxLogLevelFilter (now MaxLevelFilter)
- max_log_level (now max_level)
2017-05-21 20:43:59 -04:00
Amanieu d'Antras
2644916237 Add support for no_std 2016-01-14 23:55:22 +00:00
Matt Brubeck
737f8ecbfa Test the max_level features 2015-10-08 13:46:15 -07:00
Alex Crichton
c8ffc91a1a Fix tests for rust master 2015-04-02 09:40:03 -07:00
Steven Fackler
207e329267 Encapsulate data passed to Log::enabled
We may want to add things to the information provided to `log` and
`enabled`. slf4j provides the ability to pass `Marker` objects when
logging which can be used for more advanced filtering for example.
2015-03-07 22:34:39 -08:00
Alex Crichton
443249e382 Fix typo in trace! macro
Closes #19
2015-02-09 12:23:12 -08:00