Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider revisiting how fields are formatted #35

Open
hawkw opened this issue Jul 29, 2019 · 0 comments
Open

Consider revisiting how fields are formatted #35

hawkw opened this issue Jul 29, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@hawkw
Copy link
Member

hawkw commented Jul 29, 2019

This is admittedly a bit of a minor nit, but I thought it was worth bringing up: currently, the console formats fields with the form <field name>(<field value>). This resembles the Rust syntax for function application. I think it might be better to change this to a format that looks more typical for a key-value pair.

Since fields are specified in the tracing macros as <field_name> = <field_value>, I think it might be good to format them with the same syntax as they are specified. This is what tracing-fmt's default formatters use. Alternatively, we could use <field_name>: <field_value>, similarly to struct initializer syntax.

We might also want to consider special-casing fields named message, since they are known to contain a textual, human-readable message.

@hawkw hawkw added the enhancement New feature or request label Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant