Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Google Cloud Certified Professional Cloud Developer Exam Guide

You're reading from   Google Cloud Certified Professional Cloud Developer Exam Guide Modernize your applications using cloud-native services and best practices

Arrow left icon
Product type Paperback
Published in Sep 2021
Publisher Packt
ISBN-13 9781800560994
Length 382 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Sebastian Moreno Sebastian Moreno
Author Profile Icon Sebastian Moreno
Sebastian Moreno
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Section 1: Welcome to the Google Cloud Developers' Guide
2. Chapter 1: Google Cloud Platform Developer Fundamentals FREE CHAPTER 3. Chapter 2: Security Fundamentals and Best Practices 4. Section 2: Developing and Modernizing Applications on Google Cloud Platform
5. Chapter 3: Application Modernization Using Google Cloud 6. Chapter 4: Using Cloud Functions and Google App Engine 7. Chapter 5: Virtual Machines and Container Applications on Google Cloud Platform 8. Chapter 6: Managing APIs on Google Cloud Platform 9. Section 3: Storage Foundations
10. Chapter 7: Handling Unstructured Data 11. Chapter 8: Databases and Event Messages in Google Cloud 12. Chapter 9: Data Management and Database Strategies 13. Chapter 10: Optimizing Applications with Caching Strategies on Google Cloud Platform 14. Section 4: SRE for Developers
15. Chapter 11: Logging on Google Cloud Platform 16. Chapter 12: Cloud Monitoring, Tracing, and Debugging 17. Section 5: Analyzing a Sample Case Study
18. Chapter 13: HipLocal Sample Case Study Preparation 19. Chapter 14: Questions and Answers 20. Other Books You May Enjoy

How to enable an application to create custom logs

Having already reviewed what Cloud Logging is and what some of the best practices for recording log events in the cloud are, we can proceed to look at how to enable our applications to record logs in Cloud Logging.

In this section, we will review options to allow our applications to record logs using Google Cloud services, to enable us to carry out troubleshooting, analysis, and auditing tasks.

Enabling an app to create custom logs

Depending on the service we use in Google Cloud to deploy our applications, we will have to perform different tasks to enable the logging from our application to Cloud Logging.

For example, in the case of Cloud Functions, Cloud Run, Google Kubernetes Engine (GKE), App Engine, and Compute Engine, the integration with Cloud Logging is done by default; we only have to worry about using the Cloud Logging library to record our logs.

We will use a base application created in Node.js using the Cloud...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime