https://pulumi.com logo
#aws
Title
a

alert-raincoat-81485

01/05/2021, 11:27 PM
Just curious to know how can we collect the logs using
pulumi logs
All i see the message is
Copy code
Collecting logs for stack stack11 since 2021-01-05T13:55:54.000-08:00.
g

gentle-diamond-70147

01/05/2021, 11:31 PM
If you run
pulumi logs -f --logtostderr -v=9
, do you get more information?
a

alert-raincoat-81485

01/05/2021, 11:33 PM
well, it’s printing out the similar message.
is there any ways we can collect logs into log file for a particular stack?
g

gentle-diamond-70147

01/05/2021, 11:38 PM
Which logs specifically are you looking for?
a

alert-raincoat-81485

01/05/2021, 11:41 PM
just the stack logs.
Stdout, stderr for the stack provision
g

gentle-diamond-70147

01/05/2021, 11:49 PM
So the deployment logs from
up
or
destroy
?
a

alert-raincoat-81485

01/05/2021, 11:57 PM
At this moment i am trying with up.
pulumi up | pulumi logs -f --logtostderr -v=9
g

gentle-diamond-70147

01/06/2021, 12:15 AM
I see.
pulumi logs
is for something entirely different. It will actually retrieve logs from your cloud provider that are associated with resources in your stack - e.g. pull logs from cloudwatch for lambda invocations.
If you're wanting to send the output of
pulumi up
command to a file, I'd recommend using
tee
- e.g.
pulumi pre | tee preview.log
that will send to stdout and the file
preview.log
a

alert-raincoat-81485

01/06/2021, 1:17 AM
Ok that make sense to me, Your suggestion helped me to understand the scenario.
I appreciate