Is it possible to send pubsub messages to stack driver logs?

Viewed 171

I have seen examples of using log sinks to send stack driver logs to pub/sub, but I want to do the opposite.

Is it possible to configure stack driver logs to subscribe to a topic and just dump the pubsub messages to stack driver as logs? Or some way to just have all events sent to a topic go to stack driver logs?

This is instead of having to write a custom application that has to read them and write them as logs.

1 Answers

No, you can't sink the PubSub messages in Cloud Logging. You have to create a small custom app (a Cloud Functions (use runtime v2 if you have a lot of message to reduce cost) or a Cloud Run) to get the messages, to log them and ack them. Less than 10 lines of code, but you have to do it.

Related