[WIP] Log macro kv #346

Closed
Thomasdezeeuw wants to merge 2 commits from log-macro-kv into master
Thomasdezeeuw commented 2019-08-10 10:48:25 -05:00 (Migrated from github.com)

This is my attempt at modifying the log macro to add support for key values, as described in https://github.com/rust-lang-nursery/log/issues/343#issuecomment-513759469. I didn't get very far as I'm not the best at Rust macros.

Testing with cargo test --features std kv_unstable gives the following error:

error: local ambiguity: multiple parsing options: built-in NTs tt ('arg') or 1 other option.
  --> tests/kv_macro.rs:23:87
   |
23 |     log!(target: __log_module_path!(), Level::Info, "some {} message {}", "great", 1, {
   |                                                                                       ^

For #343.

/cc @KodrAus @yoshuawuyts

This is my attempt at modifying the `log` macro to add support for key values, as described in https://github.com/rust-lang-nursery/log/issues/343#issuecomment-513759469. I didn't get very far as I'm not the best at Rust macros. Testing with `cargo test --features std kv_unstable` gives the following error: ```log error: local ambiguity: multiple parsing options: built-in NTs tt ('arg') or 1 other option. --> tests/kv_macro.rs:23:87 | 23 | log!(target: __log_module_path!(), Level::Info, "some {} message {}", "great", 1, { | ^ ``` For #343. /cc @KodrAus @yoshuawuyts
Thomasdezeeuw commented 2019-09-11 05:24:23 -05:00 (Migrated from github.com)

Closing in favour of #353.

Closing in favour of #353.

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-rust-lang/log!346
No description provided.