conan-io / conan

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

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

Closed CommanderCRM closed 4 months ago

CommanderCRM commented 4 months 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 4 months 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 4 months ago

All right, noted, thanks