
Answer-first summary for fast verification
Answer: Edit the _Default sink, and select the new log bucket as the sink destination.
Option D is the most efficient solution because it directly modifies the existing _Default sink to route logs to the new log bucket, avoiding the overhead of creating new sinks or filters. This approach leverages Google Cloud Logging's capability to update sink destinations without disrupting log routing. Community discussion strongly supports D (86% consensus with upvoted comments citing official documentation and practical verification), noting it as the simplest and most direct method. Other options are less suitable: A and B involve unnecessary steps like creating exclusion filters or disabling the default sink, which add complexity. C requires manually copying inclusion filters, which is inefficient and error-prone compared to simply updating the destination of the existing default sink.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have created a new log bucket to replace the _Default log bucket. You want to route all new log entries that currently go to the _Default bucket to this new bucket in the most efficient way. What should you do?
A
Create exclusion filters for the _Default sink to prevent it from receiving new logs. Create a user-defined sink, and select the new log bucket as the sink destination.
B
Disable the _Default sink. Create a user-defined sink and select the new log bucket as the sink destination.
C
Create a user-defined sink with inclusion filters copied from the _Default sink. Select the new log bucket as the sink destination.
D
Edit the _Default sink, and select the new log bucket as the sink destination.
No comments yet.