
Answer-first summary for fast verification
Answer: Write structured logs as JSON objects serialized on a single line to stdout or stderr., Integrate the Python logging module with Cloud Logging.
The correct approach to collecting application logs in App Engine involves either using the logging package of the chosen language or by writing structured logs to stdout and stderr. Cloud Logging is enabled by default, and App Engine already has the Logs Writer role, so no additional configuration is needed for these aspects. For more details, refer to the documentation on writing app logs and structured logging.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your team is developing a Python application for a government agency, and it's decided that the application will be deployed to the App Engine Flexible environment in Google Cloud Platform (GCP). There's a security requirement for the collection of application logs. What steps can you take to meet this requirement?
A
Integrate the Python logging module with Cloud Logging.
B
Enable Cloud Logging.
C
Grant the Logs Writer role to App Engine.
D
Write structured logs as JSON objects serialized on a single line to stdout or stderr.
E
There is nothing to be done; App Engine automatically sends these logs to the Cloud Logging agent.
No comments yet.