mindsdb / mindsdb_native

Machine Learning in one line of code
http://mindsdb.com
GNU General Public License v3.0
37 stars 28 forks source link

Long lines are long and contain extra empty lines #363

Open abitrolly opened 3 years ago

abitrolly commented 3 years ago

A typical log in Google Colab.

image

A single line,

INFO:mindsdb-logger-6e7c3b4e-40f4-11eb-991b-0242ac1c0002---bfaa2fd0-59a8-4e06-891d-31b2cb576081:/usr/local/lib/python3.6/dist-packages/mindsdb_native/libs/phases/type_deductor/type_deductor.py:343 - Data distribution for column "initiative_type" of type "Text" and subtype "Short Text"

The long double UUID can be replaced by short PID. Path to mindsdb source file can also be abbreviated. If somebody needs to see where mindsdb files are located, it can be done with mindsdb_native.__file__.

In the end.

INFO:mindsdb-32906:../libs/phases/type_deductor/type_deductor.py:343 - Data distribution for column "initiative_type" of type "Text" and subtype "Short Text"

Your Environment

George3d6 commented 3 years ago

The newline after each log was a stylistic choice for easier readability, do you think it should be removed @abitrolly ? To be honest it might be better off removed, since lightwood and mindsdb proper don't add it

I'm not sure I quote understand what your other suggestion is.

abitrolly commented 3 years ago

As a person who reads log quite often I don't find extra lines more readable. They just make scrolling more tedious. It makes sense to separate blocks of info with explicit separators to easy jump to them.

The other proposal is just to make current log lines (red) shorter (green). Again, to scroll less to the right to see result.

- INFO:mindsdb-logger-6e7c3b4e-40f4-11eb-991b-0242ac1c0002---bfaa2fd0-59a8-4e06-891d-31b2cb576081:/usr/local/lib/python3.6/dist-packages/mindsdb_native/libs/phases/type_deductor/type_deductor.py:343 - Data distribution for column "initiative_type" of type "Text" and subtype "Short Text"
+ INFO:mindsdb-32906:../libs/phases/type_deductor/type_deductor.py:343 - Data distribution for column "initiative_type" of type "Text" and subtype "Short Text"
George3d6 commented 3 years ago

@abitrolly I like the idea of removing the long logging UUID, Also for things other than errors I think we can remove the path to the python file as well, entirely.

Would you be interested in helping with the impl of this? If so, let me know, if not I will assign it to someone at some point when we have more time.

abitrolly commented 3 years ago

@George3d6 unfortunately, my privilege of spending non-compensated time is running short. Maybe I will have some to study mindsdb codebase in future, but not now.