Skip to main content

A package to register GCP loggings

Project description

GCP LOGGING MANAGER Package

This is a simple gcp logging package where you can easily write logs to gcp stackdriver with custom parameters.

GCP stack driver matrics

param type: Resource type to filter in Stackdriver Logging (required) param service: Service name to filter in Stackdriver Logging (required) param log_name: Log Name to filter in Stackdriver Logging param region: GCP Service Region to filter in Stackdriver Logging (optional) if not provided will take default value region='us-east1'

Sample code

from  santodigital_gcpLogging import CloudRunLoggingClient

# Resouce must match with strack driver resource.type (cloud_run_revision or bigquery_resource etc)
resource = 'cloud_run_revision'
name = 'santodigital-gcpLogging'
SERVICE = 'santodigital-gcpLogging'
logger = CloudRunLoggingClient(resource, SERVICE, name)

"""
:param struct: (Dict) Custom information for logging into Stackdriver Logging.
:param severity: Severity Level for the logging.
"""
def report(struct, severity='INFO'):
    logger.report(struct, severity)
    return True

if __name__ == '__main__':
    print(report({'info':'success'}, 'WARNING'))

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

santodigital-gcpLogging-0.0.2.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

santodigital_gcpLogging-0.0.2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file santodigital-gcpLogging-0.0.2.tar.gz.

File metadata

  • Download URL: santodigital-gcpLogging-0.0.2.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for santodigital-gcpLogging-0.0.2.tar.gz
Algorithm Hash digest
SHA256 6354409857384b29d52a8a18ca780777cb7f40865d2bdc39256a4b9c6f4a60e2
MD5 c8b395748306c7f40f095f77393d7d9d
BLAKE2b-256 5fba4b5a20ba0d45d0b9d39f154e0ad6419c7cd76f26009b2814ee83aeaa60b6

See more details on using hashes here.

File details

Details for the file santodigital_gcpLogging-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: santodigital_gcpLogging-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for santodigital_gcpLogging-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8b02a6df43e7779c86f52fd39169987b15d3976136d85925ec5f8095ec439142
MD5 81c58032ab365353ebb3d2e0f8d87993
BLAKE2b-256 fd719351cf3f5ca8e7110fbbbd8f34195abfde27b8ccec4f7dcfde113884ac52

See more details on using hashes here.

Supported by

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