AzurePyblobLogging-1.1.9
توضیحات
A library to log into blob storage in Azure
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | AzurePyblobLogging-1.1.9 |
| نام | AzurePyblobLogging |
| نسخه کتابخانه | 1.1.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Jorge Andres Diaz |
| ایمیل نویسنده | jorgeandresdn1@gmail.com |
| آدرس صفحه اصلی | https://github.com/JorgeDiazz/pyblob_logging |
| آدرس اینترنتی | https://pypi.org/project/AzurePyblobLogging/ |
| مجوز | - |
# 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 :)')
نحوه نصب
نصب پکیج whl AzurePyblobLogging-1.1.9:
pip install AzurePyblobLogging-1.1.9.whl
نصب پکیج tar.gz AzurePyblobLogging-1.1.9:
pip install AzurePyblobLogging-1.1.9.tar.gz