in `create_relay` I do pulumi.log / print but I...
# general
I do pulumi.log / print but I can't see their output ? How can I select the log level with automation ? how can I see my prints ?
There should be an overload you can provide that allows you to hook into standard out and standard error.
I see you are doing on_output. What is the print function you are providing doing?
into standard out and standard error.
isn't it just stdout ? I used the "print" function from python
Are you running in a context where you can see standard output from outside the pulumi function? Try testing it, build a string with everything that comes into the on_output function and print it after. I don't write in python so I can say by looking at it.
First I would verify that I am actually getting output from on_output.
I dot get output ("Resources unchanged ... duration: 1s") but none of what I set. I've actually tried to add a sys.exit(1) in my "create_relay" function to no avail so either pulumi does something very strange or that function is not even called (or just when creating the stack ?) it's very weird
arf I think I found why, there is this "inline" vs "local" programs. The distinction is not clear to me at all but if I add "project_name" to the create_or_select_stack call, it converts my program into an inline one and my function is called and I can see my "prints"
the doc needs to make the disctinction clearer, and the program should log something about it, it's confusing
Ok yea the python api doesn't make it clear that you are creating a local program instead of an inline program. In the C# API it is very clear because you are providing an argument object called InlineProgramArgs: You could raise an issue about that.