Logger Formatting
Sharad24 opened this issue · comments
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:
- Put a limit on number of key-value pairs.
- Make logger choose for e.g. top 5 keypairs
- Make logging compressed (some keys can be unnecessarily long. Rather than printing in one line, use 2-3 lines to print the key).
I can take this up.
Sure!
How are you tackling this? @someshsingh22
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 ?
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?
What happens if there are a lot of keys?
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
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.
Agree with @sampreet-arthi
If it reduces readability, we should avoid it.
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.
@someshsingh22 Were you able to make any progress here?
Stale issue message