Skip to main content

Stackdriver Logging API client library

Project description

Python idiomatic client for Stackdriver Logging

pypi versions

Quick Start

$ pip install --upgrade google-cloud-logging

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

Note: The creation of cross project sinks (log exports) is not currenlty supported. You may only create sinks within the same project set for the client. In other words, the parameter uniqueWriterIdentity is not yet available.

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.

Source Distribution

google-cloud-logging-1.6.0.tar.gz (105.0 kB view details)

Uploaded Source

Built Distribution

google_cloud_logging-1.6.0-py2.py3-none-any.whl (101.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file google-cloud-logging-1.6.0.tar.gz.

File metadata

File hashes

Hashes for google-cloud-logging-1.6.0.tar.gz
Algorithm Hash digest
SHA256 d5c20606e7e5c3c1a7577a91e7ffc56924198fa8e112d279107b684b151d7e1a
MD5 0f9d4710a182e7b93bc4574636a1091b
BLAKE2b-256 198f6b1e271578b6873b74bc3e3a3c214fd1ee83ed75b4efc911f18f1279bee2

See more details on using hashes here.

File details

Details for the file google_cloud_logging-1.6.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for google_cloud_logging-1.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fb28b1f57dc47a1ff28defea34302d2d5b50b67e6e4b32bfc18d999586c14dd7
MD5 d9a292549b6b7da37ae84f46c3c777a7
BLAKE2b-256 33847fa4cc1326e19d45bd177be862e48ac3bd3044c6a754d168ebe5694fda9b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page