Logging with Stackdriver
Stackdriver Logging is a service for collecting, storing, filtering, and viewing log and event data generated in GCP and in Amazon Web Services. Logging is a managed service, so you do not need to configure or deploy servers to use the service.
The Associate Cloud Engineering Exam guidelines note three logging tasks a cloud engineer should be familiar with:
- Configuring log sinks
- Viewing and filtering logs
- Viewing message details
We’ll review each of these in this section.
Configuring Log Sinks
Stackdriver Logging retains log data for 30 days. This is sufficient if you use logs to diagnose operational issues but rarely view the logs after a few days. This is often not enough. Your organization may need to keep logs longer to comply with government or industry regulations. You may also want to analyze logs to gain insight into application performance. For these use cases, it is best to export logging data to a long-term storage system like Cloud Storage...