Dvc: logger: disable state logging by default

Created on 28 Jul 2019  路  10Comments  路  Source: iterative/dvc

Related: https://github.com/iterative/dvc/issues/2329

enhancement ui

Most helpful comment

I am ok with counting v/qs, this is more friendly for typing in. --log might be useful for scripting - more obvious when you read it, not sure how much common scripting dvc is though.

So my preference: implement v/qs, and keep --log up our sleeves for now.

All 10 comments

perhaps creating & using logging.TRACE = 5 is better than this env var?

@casperdcl could you explain a little bit more? I'm not sure where the user should set the logging.TRACE = 5 is it through the config file?

cmd|level
--:|:--
default|INFO
-v|DEBUG
-vv|TRACE

Ohh got it :+1: yep, that's what I purposed first on the linked issue:

My suggestion would be to create different verbose levels, -vvv (INFO, DEBUG, DATABASE?)
...
Modify the -v so you can express the level of verbosity with several ones -vvv
https://github.com/iterative/dvc/issues/2329#issue-473668442

I like this idea better instead of using the env var

though really I'd prefer --log TRACE|DEBUG|INFO|WARN(ING)|ERROR|FATAL, and for backward compatibility -v is a shortcut for --log DEBUG

@casperdcl is this more common? I'm more used to the v's :sweat_smile:

Even the argparse documentation has a section on it:

>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--verbose', '-v', action='count')
>>> parser.parse_args(['-vvv'])
Namespace(verbose=3)

the problem with counting -v is there's no way to access WARN and ERROR. We could count -q (quiet) or similar for that.

@casperdcl so, it would start on INFO by deafult, if you want just warnings then use one -q, if you want to silence everything -qq, and one -v will be for DEBUG and two for TRACE, right?

:thinking: let's wait for the opinion of @shcheklein, @efiop , @Suor , @pared (need some quorum on this one, can't decide by myself)

I am ok with counting v/qs, this is more friendly for typing in. --log might be useful for scripting - more obvious when you read it, not sure how much common scripting dvc is though.

So my preference: implement v/qs, and keep --log up our sleeves for now.

Awesome, @Suor , I'll add those implementation details to the description.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tc-ying picture tc-ying  路  3Comments

dmpetrov picture dmpetrov  路  3Comments

shcheklein picture shcheklein  路  3Comments

ghost picture ghost  路  3Comments

jorgeorpinel picture jorgeorpinel  路  3Comments