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

progress: use logger.info() instead of print() #1724

Closed
pared opened this issue Mar 13, 2019 · 9 comments
Closed

progress: use logger.info() instead of print() #1724

pared opened this issue Mar 13, 2019 · 9 comments
Assignees
Labels
refactoring Factoring and re-factoring

Comments

@pared
Copy link
Contributor

pared commented Mar 13, 2019

Progress bar writes directly to sys.stdout, logger does not.
Need to make progress bar use logger.info() instead of print()

@pared pared changed the title Standarize dvc outputs. Progress: use logger.info() instead of print() Mar 13, 2019
@pared pared changed the title Progress: use logger.info() instead of print() Progress: use logger.info() instead of print() Mar 13, 2019
@efiop efiop changed the title Progress: use logger.info() instead of print() progress: use logger.info() instead of print() Mar 13, 2019
@efiop efiop added the enhancement Enhances DVC label Mar 13, 2019
@J0
Copy link
Contributor

J0 commented Mar 22, 2019

@pared can I take this issue? Think it can be done quite quickly

@pared
Copy link
Contributor Author

pared commented Mar 22, 2019

@J0 sure, if it is unassigned feel free to go, thanks for notice :)

@pared
Copy link
Contributor Author

pared commented Mar 22, 2019

I cannot assign you, @efiop can you do that?

@efiop
Copy link
Member

efiop commented Mar 22, 2019

@pared Unfortunately I can't 🙁 Only members can be assigned to a task.

@shcheklein
Copy link
Member

@J0 I've sent you a collaborator invite. After that we will be able to assign ticket to you. Most likely, you will be able to take them on your own :).

@J0
Copy link
Contributor

J0 commented Apr 1, 2019

@efiop I would like to trouble you for help/advice on this issue. I was under the impression that naively changing the print static method in progress.py
from

@staticmethod
def print(*args, **kwargs):
    import dvc.logger as logger
    if logger.is_quiet():
        return

    print(*args, **kwargs)

to

@staticmethod
def print(*args, **kwargs):
    import dvc.logger as logger

    if logger.is_quiet():
        return
    logger.info(*args, **kwargs)

would solve the issue but unfortunately, this causes most of the tests to break. Any idea what might be going on and any suggestions on how I should proceed?

@ghost
Copy link

ghost commented Apr 1, 2019

@J0 , I'm currently working on this issue #1753 that will refactor how DVC uses logging, and then, I'll tackle #1797, rewriting how tests with logging work.

Would you mind waiting a little bit until those two issues are closed?

Thanks for your interest in contributing, tho, that's awesome 🎉 !

@ghost ghost added refactoring Factoring and re-factoring and removed enhancement Enhances DVC labels Apr 1, 2019
@J0
Copy link
Contributor

J0 commented Apr 1, 2019

Sure! I'll go work on the other issues I've been assigned to first

@efiop
Copy link
Member

efiop commented Jul 23, 2019

This is no longer needed. Proper solution will be introduced in #2148

@efiop efiop closed this as completed Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Factoring and re-factoring
Projects
None yet
Development

No branches or pull requests

4 participants