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

df1: Write formal spec #21

Open
k0001 opened this issue May 7, 2018 · 3 comments
Open

df1: Write formal spec #21

k0001 opened this issue May 7, 2018 · 3 comments

Comments

@k0001
Copy link
Owner

k0001 commented May 7, 2018

No description provided.

@k0001
Copy link
Owner Author

k0001 commented Aug 18, 2018

As of df1 0.2 there is a draft BNF specification in the docs. This hasn't been verified, however.

@juhp
Copy link

juhp commented Dec 12, 2023

I am curious why Level comes after Path?
Certainly not easier for humans to read I think.

Anyway just a random thought/question - I haven't even tried the libraries :-)

@k0001
Copy link
Owner Author

k0001 commented Dec 12, 2023

Hello @juhp! How are you? Good question. There are two reasons for this.

  1. The level words (DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY) are not of the same length. This means that when rendered as a prefix, they will cause the following /foo bar=baz /qux path to be misaligned vertically across multiple lines. I find this to be more harmful to quick visual pattern recognition than putting the level later. Consider how this example would change if the paths were misaligned vertically:

Image

  1. The level words are not a well-formed path part (those need to start with / or have a = in it), so if we put it right after the path, it can serve as a separator between the path and the message, too. Otherwise, we'd need some kind of separator to tell the path apart from the message.

I'm happy to entertain different ideas if you have them. I haven't been able to come up with a better solution than the current one. Colors help a lot.

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

No branches or pull requests

2 participants