skip to navigation
skip to content

google-cloud-logging 1.4.0

Python Client for Stackdriver Logging

Python idiomatic client for Stackdriver Logging

Quick Start

$ pip install --upgrade google-cloud-logging

Fore more information on setting up your Python development environment, such as installing pip and on your system, please refer to Python Development Environment Setup Guide for Google Cloud Platform.

Authentication

With google-cloud-python we try to make authentication as painless as possible. Check out the Authentication section in our documentation to learn more. You may also find the authentication document shared by all the google-cloud-* libraries to be helpful.

Using the API

Stackdriver Logging API (Logging API docs) allows you to store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform.

from google.cloud import logging
client = logging.Client()
logger = client.logger('log_name')
logger.log_text('A simple entry')  # API call

Example of fetching entries:

for entry in logger.list_entries():
    print(entry.payload)

See the google-cloud-python API logging documentation to learn how to connect to Stackdriver Logging using this Client Library.

 
File Type Py Version Uploaded on Size
google-cloud-logging-1.4.0.tar.gz (md5) Source 2017-10-31 53KB
google_cloud_logging-1.4.0-py2.py3-none-any.whl (md5) Python Wheel py2.py3 2017-10-31 42KB