Skip to content

Instantly share code, notes, and snippets.

@bgweber
Created February 17, 2020 16:35
Show Gist options
  • Save bgweber/8e7ceafe3ad14208011eaa8b262af0a1 to your computer and use it in GitHub Desktop.
Save bgweber/8e7ceafe3ad14208011eaa8b262af0a1 to your computer and use it in GitHub Desktop.
# connect to the monitoring service
from google.cloud import logging
logging_client = logging.Client(project = 'serving-268422', credentials = credentials)
logger = logging_client.logger('model_service')
# log a message to stack driver
logger.log_text('Hello World!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment