Skip to main content

A library to log into blob storage in Azure

Project description

PYBLOB LOGGING

Integrate this library on your project to log into both Terminal and Azure Blob Storage.

Implementation

Importing libraries

from PyblobLogging import PyblobLogging
from BlobDescription import BlobDescription
import os
import sys

Initializing Logger

ROOT_DIR = os.path.dirname(sys.modules['__main__'].__file__)

blob_description = BlobDescription(storage_connection_str, container_name, path_inside_container, ROOT_DIR)

# Example:
# blob_description = BlobDescription('DefaultEndpointsProtocol=https;AccountName=xx;AccountKey=xx/xxx/xx;EndpointSuffix=xx','my-container-name', 'directory1/directory2/', ROOT_DIR) 

logger = PyblobLogging.get_blob_logger('My Logger Name', blob_description)

Using functions

# To log errors
ex = Exception('Error')
logger.error('This is an error log :(', ex)

# To log another type of messages
logger.debug('This is a debug 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

AzurePyblobLogging-1.1.14.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

AzurePyblobLogging-1.1.14-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file AzurePyblobLogging-1.1.14.tar.gz.

File metadata

  • Download URL: AzurePyblobLogging-1.1.14.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.12

File hashes

Hashes for AzurePyblobLogging-1.1.14.tar.gz
Algorithm Hash digest
SHA256 0c261a87f4b63fc632f71472f77b905eb43e498c2d1aa68869a46ce8ce76c880
MD5 46c8a19f8b88a7785d1f8d11fa7ae0e3
BLAKE2b-256 dd442b32362ebec1d27b4e45d20c436d0a042f958dce95de9cc2572ce3b9a993

See more details on using hashes here.

File details

Details for the file AzurePyblobLogging-1.1.14-py3-none-any.whl.

File metadata

  • Download URL: AzurePyblobLogging-1.1.14-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.12

File hashes

Hashes for AzurePyblobLogging-1.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 410e5a4794da583235c3285743eb13a250c951a4bbee5c6dfd4355b975cde7bf
MD5 f7961742a5adbaf3539c5e4cbb550fb0
BLAKE2b-256 74259b351c22c33977f223f3be56abf0a77738fbc76256fbc4d8428673b9d081

See more details on using hashes here.

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