Support #32474
openhow can I redirect the complete debug output in a variable in python?
Description
This is an addition to my other ticket
I want to run:
hammer -d -s https://servername -u username-p password host info --location Z1 --organization Corporate --name abv10000vmx.z1 --fields 'Content Information/Applicable Errata/Bug Fix'
If I do something like:
hammer -d -s https://servername -u username-p password host info --location Z1 --organization Corporate --name abv10000vmx.z1 --fields 'Content Information/Applicable Errata/Bug Fix' > test
test has just the empty lines in it no debug output
How can I get the complete debug Output either in a file or much better in a variable in python so I can search it for my erratas?
Updated by Oleh Fedorenko over 3 years ago
Daniel Ullrich wrote:
This is an addition to my other ticket
I want to run:
hammer -d -s https://servername -u username-p password host info --location Z1 --organization Corporate --name abv10000vmx.z1 --fields 'Content Information/Applicable Errata/Bug Fix'If I do something like:
hammer -d -s https://servername -u username-p password host info --location Z1 --organization Corporate --name abv10000vmx.z1 --fields 'Content Information/Applicable Errata/Bug Fix' > test
test has just the empty lines in it no debug outputHow can I get the complete debug Output either in a file or much better in a variable in python so I can search it for my erratas?
Hi Daniel,
first of all, so sorry for the delay. It's better to use our forum for such questions: https://community.theforeman.org/ Also, it's more likely to get an answer there in a short time :)
Regarding your issue (talking about both since they are the same): could you try to redirect output without --fields option specified? What I mean is have you tried to run
hammer --output-file /path/to/file -s https://servername -u username-p password host info --location Z1 --organization Corporate --name abv10000vmx.z1
?
Updated by Daniel Ullrich over 3 years ago
okay so I will post my question in the forum, too.
Actually here the output works. Shows very detailed informations about the host. I cannot post it here as there are personal and other sensible data in it.
But I think its more important, that there is coming output at all.