Your Compute Engine app writes logs to disk and you want to view them in Cloud Logging without changing app code. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Install the Cloud Logging agent and configure it to send the application's log files..
Why this is the answer
The Cloud Logging agent (based on Fluentd) is designed to stream logs from Compute Engine instances to Cloud Logging. By installing and configuring it, you can specify the paths to your application's log files, and the agent will automatically collect and send them without requiring any changes to your application code. Using a Cloud Logging client library would require modifying the application code, which the question explicitly states you want to avoid. Providing the log file folder path in instance metadata is not a standard mechanism for configuring log shipping to Cloud Logging; the agent handles this configuration. Changing the application to log to /var/log would also require code changes and doesn't guarantee automatic shipping without the agent.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed