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

Logger Formatting #283

Open
Sharad24 opened this issue Aug 28, 2020 · 12 comments
Open

Logger Formatting #283

Sharad24 opened this issue Aug 28, 2020 · 12 comments
Assignees
Labels
enhancement New feature or request no-issue-activity

Comments

@Sharad24
Copy link
Member

The current logger might go on to the next line if there are a lot of key, value pairs. There could be three solutions to this:

  1. Put a limit on number of key-value pairs.
  2. Make logger choose for e.g. top 5 keypairs
  3. Make logging compressed (some keys can be unnecessarily long. Rather than printing in one line, use 2-3 lines to print the key).
@Sharad24 Sharad24 added the enhancement New feature or request label Aug 28, 2020
@someshsingh22
Copy link
Member

I can take this up.

@sampreet-arthi
Copy link
Member

Sure!

@Sharad24
Copy link
Member Author

How are you tackling this? @someshsingh22

@someshsingh22
Copy link
Member

someshsingh22 commented Aug 29, 2020

Split Longer Keys into multiple lines

Also I would recommend converting values into scientific notation to give a very clean view.

How does that sound ?

@Sharad24
Copy link
Member Author

Split Longer Keys into multiple lines

Sg!

Also I would recommend converting values into scientific notation to give a very clean view.

How does that sound ?

How does shifting to scientific notation give a clean view?

@Sharad24
Copy link
Member Author

What happens if there are a lot of keys?

@someshsingh22
Copy link
Member

The advantage of having numerical values in scientific notation is that you will have a fixed length representation.

Multiple key value pairs can also be split on the basis of maximum length I guess

@sampreet-arthi
Copy link
Member

Tbh, shifting to scientific notation doesn't sound like a good idea. For the simple reason that it doesn't look good. The current logger takes care of the fixed length problem so that's not an issue as you can use the same logic.

@Sharad24
Copy link
Member Author

Agree with @sampreet-arthi

If it reduces readability, we should avoid it.

@someshsingh22
Copy link
Member

Ok then we can split the lines into multi-lines based on their length.
Additionally, we can make the user pass the key, value pairs that he wants to log.

@Sharad24
Copy link
Member Author

Sharad24 commented Sep 2, 2020

@someshsingh22 Were you able to make any progress here?

@github-actions
Copy link

github-actions bot commented Nov 2, 2020

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request no-issue-activity
Projects
None yet
Development

No branches or pull requests

4 participants