433 Commits

Author SHA1 Message Date
Ashley Mannix
70b78abf07
Merge pull request #345 from KodrAus/cargo/0.4.8
prepare for 0.4.8 release
0.4.8
2019-07-29 07:03:20 +10:00
Ashley Mannix
782d4f7cf1 prepare for 0.4.8 release 2019-07-28 10:59:59 +10:00
Ashley Mannix
b0957eaf14
Merge pull request #344 from sfackler/static-str
Dynamically track the 'static-ness of record strings
2019-07-28 10:51:28 +10:00
Steven Fackler
459c59ea0f Dynamically track the 'static-ness of record strings
Logger implementations commonly need to convert a `Record` into a
non-borrowed form to e.g. log it asynchronously on a separate thread.
This allows them to avoid having to allocate owned `String`s for the
module path and file fields, which will in practice almost always be
`'static`.

cc #206
2019-07-26 20:37:21 -07:00
Ashley Mannix
c098145024
Merge pull request #342 from KodrAus/feat/sval-values
Add structured support to kv::Value using sval
2019-07-25 07:17:08 +10:00
Ashley Mannix
368a7777dc test sval feature in CI
split consumer builds of MSRV from dev builds
2019-07-17 09:39:58 +10:00
Ashley Mannix
06beb05c42 add sval support for Value
bump to 1.31.0
2019-07-16 14:31:40 +10:00
Ashley Mannix
15ccf07784 refactor value layout for easier additional frameworks 2019-07-16 14:27:57 +10:00
Ashley Mannix
e5bfc5459c
Merge pull request #341 from atouchet/travis
Update Travis CI URL
2019-07-16 09:08:39 +10:00
Alex Touchet
4628688c01
Update Travis CI URL 2019-07-09 13:08:09 -07:00
Steven Fackler
be6980d5b1
Merge pull request #340 from KodrAus/cargo/0.4.7
Prepare for 0.4.7 release
0.4.7
2019-07-09 11:25:58 -07:00
Ashley Mannix
8075b6912d include kv_unstable feature in docs.rs 2019-07-06 12:02:36 +10:00
Ashley Mannix
af184520e8 prepare for 0.4.7 release 2019-07-06 11:59:53 +10:00
Ashley Mannix
9b71d367a0
Make it easier to create a Value from owned or erased external types (#339)
* refactor Value internals to avoid needing to buffer

that means doing two things:

1. allowing us to create a value with any lifetime from some owned
primitive, like u8, bool etc
2. allowing us to create a value from some type that _can_ produce
a concrete value we can use, but doesn't guarantee it will live as
long as the value itself

* add test for Fill
2019-07-06 11:41:32 +10:00
Ashley Mannix
a764fdaad8
Merge pull request #338 from dereckson/clean-duplicate-in-readme-for-rust-2018
Remove duplicate Rust 2018 documentation
2019-07-06 11:27:46 +10:00
Ashley Mannix
d85209f218
Merge pull request #337 from tmccombs/std-kv-sources
Add impls for Source for HashMap and BTreeMap
2019-07-04 07:52:32 +10:00
Ashley Mannix
bcbee9f64f
Merge pull request #336 from tmccombs/kv-error
Add conversion to/from io::Error for kv::Error
2019-07-04 07:51:14 +10:00
Sébastien Santoro
aa796fb93c Remove duplicate Rust 2018 documentation
This is a follow-up for changes 0da424552703 and 0f3ffb9d051c.
2019-07-02 14:58:21 +00:00
Thayne McCombs
86748c8f19 Fix error with rustc 1.21 2019-07-01 12:29:32 -06:00
Thayne McCombs
506167c3e7 Add impls for Source for HashMap and BTreeMap 2019-07-01 12:24:00 -06:00
Thayne McCombs
e81509fab1 Add conversion to/from io::Error for kv::Error
And keep the original error, so that an io error inside the visitor is
returned accessible by the call to `visit`.
2019-07-01 11:37:12 -06:00
Ashley Mannix
569175ef4d
Merge pull request #335 from KodrAus/feat/source-get
Add a Source::get method for finding a single value
2019-07-01 10:12:17 +10:00
Ashley Mannix
11ba139652 add a Source::get method for finding a single value 2019-06-28 13:03:16 +10:00
Steven Fackler
8dbb2f51e9
Merge pull request #333 from johndrinkwater/master
Respect padding for LevelFilter Display
2019-05-16 09:22:37 -07:00
John Drinkwater
f9eb14c8a1 Respect padding for LevelFilter Display
This mirrors a similar commit fe073054a0999d1bb238cb0293757741e95b3588
that changed output for Level, it seems sensible if the user wishes to
output the logging filter level to afford the same formatting choices.
2019-05-16 11:10:40 +01:00
David Tolnay
5213657b81
Switch to SPDX 2.1 license expression 2019-05-09 15:33:21 -07:00
Ashley Mannix
533662d167
Merge pull request #330 from dtolnay/edition
Update documentation to 2018 edition
2019-05-01 08:14:54 +10:00
David Tolnay
0f3ffb9d05
Update documentation to 2018 edition 2019-04-30 01:33:31 -07:00
David Tolnay
41193b9223
Clean up trailing whitespace 2019-04-30 01:33:21 -07:00
Ashley Mannix
cd690d1607
Add a count method to Source (#329) 2019-04-30 12:16:50 +10:00
Ashley Mannix
84fffab7f0
Build out initial key values API (#324) 2019-04-29 14:32:30 +10:00
Steven Fackler
75043f9ba3
Merge pull request #325 from jonas-schievink/thumbv6
Thumbv6 support
2019-03-28 09:01:48 -07:00
Jonas Schievink
0f4bdaa17a Address documentation nits 2019-03-25 11:14:15 +01:00
Jonas Schievink
3d9bf60ff4 Clarify safety conditions of set_logger_racy 2019-03-19 13:21:04 +01:00
Jonas Schievink
ee8b8c6962 Don't test thumbv6 support on 1.16.0 2019-03-18 23:43:06 +01:00
Jonas Schievink
08ed9b3b00 Test thumbv6 support on Travis 2019-03-18 23:13:07 +01:00
Jonas Schievink
b74bc7821f Support thumbv6 by providing a thread-unsafe initialization function 2019-03-18 23:13:07 +01:00
David Tolnay
b782a88236
Merge pull request #323 from Enet4/patch-1
Update Cargo.toml
2019-03-12 15:05:33 -07:00
Eduardo Pinho
51cfe57667
Update Cargo.toml
remove homepage field (C-METADATA)
2019-03-12 21:56:10 +00:00
Ashley Mannix
74584a57ac
An RFC for structured logging (#296) 2019-03-11 09:23:05 +10:00
David Tolnay
ce64c06a37
Format with rustfmt 2019-02-14 2019-03-09 16:15:10 -08:00
David Tolnay
f8522dbeb6
Merge pull request #322 from dtolnay/missing
Improve error when missing macro argument
2019-03-09 16:12:08 -08:00
David Tolnay
c69948d391
Improve error when missing macro argument
The log! macro matches part of its arguments as $($arg:tt)+, but the other
macros match it as $($arg:tt)*. That means if a user calls error!() or any of
the other macros with an empty argument, it successfully matches the macro rules
of the first macro they called but then turns into an invalid call to log!,
leading to a confusing error message.

This PR uses $($arg:tt)+ consistently to match arguments.

Example:

    use log::error;

    fn main() {
        error!();
    }

Before:

    error: expected identifier, found `,`
     --> src/main.rs:4:5
      |
    4 |     error!();
      |     ^^^^^^^^^
      |     |
      |     expected identifier
      |     help: remove this comma
      |
      = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

After:

    error: unexpected end of macro invocation
     --> src/main.rs:4:5
      |
    4 |     error!();
      |     ^^^^^^^^^ missing tokens in macro arguments
2019-03-09 15:51:46 -08:00
Ashley Mannix
7d7daf6258
Merge pull request #321 from dekellum/ignore-atomic-init-depr
Silence deprecation warning for ATOMIC_USIZE_INIT
2019-02-04 07:02:40 +10:00
David Kellum
48dcb095f6 Silence deprecation warning for ATOMIC_USIZE_INIT
ATOMIC_USIZE_INIT was deprecated in rust 1.34. Silence the deprecation
warning until our MSRV >= 1.24, where we can use the replacement const
fn `AtomicUsize::new`

github: fixes #320
2019-02-03 09:24:34 -08:00
Steven Fackler
feac7b7af2
Merge pull request #319 from dekellum/fix-max-level-features-warning
Move max_level_features project out of tests to avoid warning
2019-02-01 20:24:50 -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
Ashley Mannix
d9f8141a39
Merge pull request #315 from fitzgen/wasm
README: Add `console_log` implementation for WebAssembly
2019-01-15 10:34:57 +10:00
Nick Fitzgerald
10d6e16d21 README: Add console_log implementation for WebAssembly 2019-01-14 15:41:28 -08:00
Ashley Mannix
4337316374
Add minimum version policy to readme (#313) 2019-01-04 10:06:47 +10:00