Skip to main content

Google Cloud Platform logging package

Project description

GCP Cloud logger

Package for Google Cloud Logging client


Install

pip install gcp-cloud-logger

Usage

from gcp_cloud_logger import cloud_logger as logger

# Default use GOOGLE_APPLICATION_CREDENTIALS to get credential.json path
logger.setup(
    name="logger_name",
    credential_path="/your/service/account/json",
)
# OR
logger.setup(
    name="logger_name",
    credential_json="{}",
)

# Info
logger.info("Test info log message")

# Warning
logger.warn("Test warning log message")

# Error
logger.error("Test error log message")

# Critical
logger.critical("Test critical log message")

Result

Result log

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

gcp-cloud-logger-0.2.4.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

gcp_cloud_logger-0.2.4-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

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