Conan: [feature] Add `--verbose` option to all commands

Created on 18 Sep 2019  路  11Comments  路  Source: conan-io/conan

I've created this ticket to split out the very cool idea of a --verbose option to all commands from the existing request:

https://github.com/conan-io/conan/issues/1432 "Add verbose and dry-run options to all commands"

which I'm guessing is now probably blocked on the --dry-run option that might take a lot more thought to implement.

Even --verbose alone would be much appreciated.

I'd especially like it if verbosity was automagically propagated into subordinate tools such as cmake build:

    def build(self):
        cmake = CMake(self)
        cmake.verbose = True

https://docs.conan.io/en/latest/reference/build_helpers/cmake.html

Support for this at a conan create command line parameters level would be nice for us because our Jenkins jobs support appending additional parameters to our conan create steps from the Jenkins jobs parameters, so would be nice for build debugging.
Conan v1.16.1 on Windows Server 2012 R2

To help us debug your issue please explain:

  • [x] I've read the CONTRIBUTING guide.
  • [x] I've specified the Conan version, operating system version and any tool that can be relevant.
  • [x] I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.
queue feature

Most helpful comment

Hi! @czoido , regarding the new CLI implementation maybe this is worth considering: having a verbosity flag (-v, -vv,...) that propagates to Conan itself and to every other application run by Conan.

All 11 comments

Hi @michaelmaguire !

cmake.verbose is very specific, because cmake offers such options by a common definition. So we would need to investigate for any generator.

For now, Conan offers 2 env var for a verbose output:
https://docs.conan.io/en/latest/reference/env_vars.html#conan-logging-level
https://docs.conan.io/en/latest/reference/env_vars.html#conan-print-run-commands

Also, you can check:
https://docs.conan.io/en/latest/reference/env_vars.html#conan-verbose-traceback
https://docs.conan.io/en/latest/reference/env_vars.html#conan-trace-file

Is it enough for your case or do you have another idea?

The verbosity of the output was also mentioned here:
https://github.com/conan-io/conan/issues/5730

It would probably require some refactoring into the parameters propagation though. It's kinda scary to track all ways they're propagated. 馃槦

Verbose is too general, need to be more specific, like, do we need multi levels of verbosity (-v, -vv, -vvv), what should be printed when verbose is actived?

For now we have tons of output when the logging level is 10. Is it enough as --verbose level? Do we need trace level?

@uilianries uilianries

Is it enough for your case or do you have another idea?

It would be very useful if those logging levels could be specified as (universally accepted) parameters to command line invocations, rather than only via environment variables.

We could have the default verbosity level in the config (like the logging level right now, but it's not really informative, should be named) and the argument from cli to override the default behaviour.

By default, we have too much information visible too, like all these warnings, the default build output and etc.

The baseline that we need is -q, none, -v, -vv, -vvv.

Example:
https://symfony.com/doc/current/console/verbosity.html

Well, we can set the logging level by .config file:
https://docs.conan.io/en/latest/reference/config_files/conan.conf.html#log

Indeed, managing the logging level by arguments it would be an extra. Since it does not require new log entries, I see no problem adding this feature.

Yes, as I mentioned the logging level that we have right now in numbers could be confusing. Should be some semantic meaning.

Yes, I agree. It's based on Python logging level, which are enumerators.

Hi,

Any solution?

My project uses conan and have a lot of unnecessary log:
https://travis-ci.com/ezored/ezored

Thanks.

Hello!
This question came up at https://github.com/conan-io/conan-center-index/pull/2009#discussion_r443839875

It would be nice to have a configuration option:
cmake_verbose=True/False (or similar) which, when defined, would enable the --verbose flag of cmake --build.

Hi! @czoido , regarding the new CLI implementation maybe this is worth considering: having a verbosity flag (-v, -vv,...) that propagates to Conan itself and to every other application run by Conan.

Was this page helpful?
0 / 5 - 0 ratings