conan-io / docs

conan.io reStructuredText documentation
http://docs.conan.io
MIT License
110 stars 361 forks source link

self.output in Conan 2.2 #3832

Closed Ed-CMI closed 2 months ago

Ed-CMI commented 2 months ago

What is your question?

The following link shows some information about different methods for self.output. Is there any more documentation regarding the different methods. For ex, what would be the benefits or difference between using the debug verse trace method in self.output?

https://docs.conan.io/2.2/reference/conanfile/running_and_output.html

Have you read the CONTRIBUTING guide?

ErniGH commented 2 months ago

Hey @Ed-CMI 👋 , unfortunately, we don't have specific documentation for each method. In the link you provided, you can see all the methods related to output, ordered from the most verbose to the least. They all display a message on the screen, but the difference between them lies in when they are shown, depending on the verbosity level you set for Conan.

Most commands have the option -v [V] option with valid levels from less to more verbose: -vquiet, -verror, -vwarning, -vnotice, -vstatus, -v or -vverbose, -vv or -vdebug, -vvv or -vtrace.

For example, -vquiet doesn't display any messages, -verror only shows error messages, -vwarning shows both error and warning messages, and so on.

You can also set the verbosity using the CONAN_LOG_LEVEL environment variable. https://docs.conan.io/2/reference/environment.html#logging

I hope this helps! Feel free to reach out if you have any other questions.

Ed-CMI commented 2 months ago

Can you please more details on trace, debug, and verbose methods? I would like to understand the difference between these methods to try and select the best method to print out generic information for the user that might help them troubleshoot issues in the recipe files.

ErniGH commented 2 months ago

Essentially, the three methods are the same; the only difference is the level of verbosity at which they are displayed. By default, none of them are shown. From least specific to most specific, we have:

Ed-CMI commented 2 months ago

Thanks for the explanation. Can you please update the training material for conan with these types of details. I will close this ticket.

memsharded commented 2 months ago

Information added in https://github.com/conan-io/docs/pull/3839 to the docs