Python Client for Stackdriver Logging
Project description
Python idiomatic client for Stackdriver Logging
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for google-cloud-logging-1.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85d47fc2cb0f7a95da4983715fa4a9e4513a56b23042dcf24dc85d4d91cdd9fa |
|
MD5 | 7f1ae07d9b0e86f57771f3986c6cf694 |
|
BLAKE2b-256 | 83115d6243ff5105024beef399893d755696b0947ff5fe0d40b74c627f3046d7 |
Hashes for google_cloud_logging-1.5.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f39af776ae0958a033ce06204f5b3ae05c62d21cb3c64daba70253825e01770 |
|
MD5 | 0d4c436b01b7d495259db6a5a565c330 |
|
BLAKE2b-256 | bbba24fbcf4855c71e83a379b7b862efb70d3ccaeaa69a6fa4d1c0cac20c242c |