Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Python Client for Stackdriver Logging

Project description

Python idiomatic client for Stackdriver Logging

pypi versions

Quick Start

$ pip install --upgrade google-cloud-logging

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for google-cloud-logging, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size google_cloud_logging-1.1.0-py2.py3-none-any.whl (43.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size google-cloud-logging-1.1.0.tar.gz (28.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page