QuestionQ264

Integrating applications with Google Cloud services

You are deploying an application to a Compute Engine virtual machine instance. The application is configured to write its log files to disk. You want to view those logs in Stackdriver Logging without modifying the application code.

What should you do?

  • A Install the Stackdriver Logging Agent and configure it to send the application logs.
  • B Use a Stackdriver Logging Library to log directly from the application to Stackdriver Logging.
  • C Provide the log file folder path in the metadata of the instance to configure it to send the application logs.
  • D Change the application to log to /var/log so that its logs are automatically sent to Stackdriver Logging.
Explanation

The Stackdriver Logging Agent can be configured to read application log files stored on a Compute Engine VM and forward their records to Cloud Logging, without requiring changes to the application. The legacy Logging agent supports configuring additional file-based log inputs.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!