'Saving console logs to GCP

I am using nodeJs application in GCP CloudRun environment.
And using console.log to log some of the important information to GCP logging.

I have the below query regarding the logging:

  • Will it make any difference in charge/cost if I stringify the logs rather than directly doing console.log.

Thank you



Solution 1:[1]

As per documentation, logs are priced by data volume.

So if signifying your logs changes the volume of the logs than yes, it will affect your GCP cost.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 someRandomDev