Forum How do I...?

Generate Debug logs for a Prince AWS lambda & API gateway deployment

We have deployed Prince on AWS lambda and PI gateway following the instructions on

We are able to see error logs in the AWS cloud watch logs. However we are unable to view DEBUG or INFO logs from prince on the cloudwatch logs.

Is there documentation on how we can get the debug logs for prince to be printed on the AWS cloudwatch log groups?
I'm not the right person to answer this, but I'd suggest adding "--debug" to the “array of Prince’s command line options” as that article describes for how to add options.
Have added those options to the index.js as below:

let child = execFile("./prince", ["-", "-o", "-", "--debug", "-v"], opts, function(err, stdout, stderr) {

Still unable to see debug/info logs in cloud watch logs for the lambda.
Turning on "--debug" will output messages to stderr, however looking at the code from the link above, it doesn't seem to output stderr anywhere.

Can you try adding the following after the "execFile()" call and let me know if it worked?

That worked nicely. The log now has the prince debug messages.

Thanks for the prompt response.
Great, I'm glad that worked for you.