Skip to content

[WIP] Log macro kv#346

Closed
Thomasdezeeuw wants to merge 2 commits into
rust-lang:masterfrom
Thomasdezeeuw:log-macro-kv
Closed

[WIP] Log macro kv#346
Thomasdezeeuw wants to merge 2 commits into
rust-lang:masterfrom
Thomasdezeeuw:log-macro-kv

Conversation

@Thomasdezeeuw
Copy link
Copy Markdown
Collaborator

This is my attempt at modifying the log macro to add support for key values, as described in #343 (comment). 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

@yoshuawuyts yoshuawuyts mentioned this pull request Sep 1, 2019
1 task
@Thomasdezeeuw
Copy link
Copy Markdown
Collaborator Author

Closing in favour of #353.

@Thomasdezeeuw Thomasdezeeuw deleted the log-macro-kv branch September 11, 2019 10:24
EFanZh pushed a commit to EFanZh/log that referenced this pull request Jul 23, 2023
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant