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

Use logging instead of print #286

Open
leapingllamas opened this issue Jan 22, 2023 · 1 comment
Open

Use logging instead of print #286

leapingllamas opened this issue Jan 22, 2023 · 1 comment

Comments

@leapingllamas
Copy link

leapingllamas commented Jan 22, 2023

The output is very chatty, especially progress reports from genetic.py. With most packages, one can apply logging filters outside the code to modify what information is surfaced. For instance, I normally would be able to do something like this in my calling code:

    logger_gplearn = logging.getLogger('gplearn')
    logger_gplearn.setLevel(logging.WARN)

However, as this repo uses print statements instead of logging, this is not possible. Logging is generally best practice as you can control the look and style of the output, show timestamps, line numbers, set levels and so on.

@trevorstephens
Copy link
Owner

PR welcome ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants