conan
conan copied to clipboard
[feature] Reduce build/compile output/logging
What is your suggestion?
Conan prints a lot of stuff while building dependencies, which can be useful for debugging. However, often it clutters the console and even exceeds the maximum log size in a CI pipeline. The logs include configure output, compiler warnings, and sometimes all compiler command lines (most notably with openssl, likely due to GNU make or something). It would be nice to have the option to suppress or reduce build output.
While we do have tools.build:verbosity=quiet and tools.compilation:verbosity=quiet, these are the default values and are not so much quiet as they are just normal, as they just mean "do not pass the verbose flag to the build tool".
Have you read the CONTRIBUTING guide?
- [X] I've read the CONTRIBUTING guide
Hi! Thanks for your request.
Have you experimented with the -v verbosity flags when calling your Conan command?
Setting -vwarning should suppress most output except for warnings and errors
@RubenRBS Hello! Yes, but this only suppresses Conan's own output, not e.g. CMake output. Check with e.g. conan install --requires=zlib/[~1] --build='*' -vwarning
I'd like to know more about what you current situation/pain is to be able to further understand the necessity of such a quiet mode, as in most cases I'd recommend against suppressing build output, as it's good to have when dependencies have a failing build for example.
Are you in a situation where you are building all your dependencies? Do you have many of them? Are they generating lots of output? :)
Hi @RubenRBS , I have the same use-case, some users like to see the details while some others just want to straight come to the error , so with conan commands I use the -verror which takes them straight to the error. For me offcourse its interesting to see the build output. My question is : Is there a central configuration for it ? or is it set per conan command? I remember that in conan-1.x one could have a central configuration for the verbosity level.
In Conan 2 there is a new CONAN_LOG_LEVEL env-variable that allows to define a global log level in the machine: https://docs.conan.io/2/reference/environment.html