Support #32474
open
how can I redirect the complete debug output in a variable in python?
Added by Daniel Ullrich over 3 years ago.
Updated over 3 years ago.
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?
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 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?
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
?
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.
Also available in: Atom
PDF