conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
7.95k stars 951 forks source link

[question] Is there any way to get conan_run.log in Conan v2? #16524

Closed CommanderCRM closed 5 days ago

CommanderCRM commented 1 week ago

What is your question?

Hi, previously there was an environment variable called CONAN_LOG_RUN_TO_FILE earlier which parsed the Conan output to .log file.

I've visited new env reference and global.conf reference, there doesn't seem to be anything alike. Is there any way to log the build process to a file now?

Have you read the CONTRIBUTING guide?

franramirez688 commented 6 days ago

Hi @CommanderCRM ,

Yes, we got rid of that variable in Conan 2.x. We would recommend that you redirect the output directly to a file via CLI. Something like:

conan create . > my_log.txt
conan install --requires=zlib/1.3.1 --format=json > my_log.json

If you also want to redirect the stdout to a file and the stderr to the stdout:

conan create . >file.log 2>&1
CommanderCRM commented 5 days ago

All right, noted, thanks