Azure App Insights Logger
A simple logging utility for python application that provides consistent logging setup across different modules using AzureLogHandler. Log will also be streamted to the console.
Installation
pip install azappinsights-logger --upgrade (prod)
pip install --index-url https://test.pypi.org/simple/ azappinsights-logger --upgrade (non prod)
The --upgrade is only required if you are installing an upgraded version of the package
Depdencies opentelemetry-sdk, azure-monitor-opentelemetry and python-dotenv should be installed with the package.
Usage
Create an environment variable with the name APPLICATIONINSIGHTS_CONNECTION_STRING and pass the value for app insights connections string.
from azappinsights_logger.logger import setup_logger
# Create a logger with default settings
logger = setup_logger("my.module")
# Create a logger with custom level
logger = setup_logger("my.module", level=logging.DEBUG)
# Use the logger
logger.info("This is an info message")
logger.debug("This is a debug message")
logger.error("This is an error message")
Features
- Consistent logging format across all modules
- Simple setup with sensible defaults
- Customizable log levels and formats
- Thread-safe logging configuration
License
This project is licensed under the MIT License
Metadata
Release files for azappinsights-logger 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| azappinsights_logger-0.0.8.tar.gz | 5.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| azappinsights_logger-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.7 kB
Release files / azappinsights_logger-0.0.8.tar.gz
| Download URL | azappinsights_logger-0.0.8.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ddcf1695333bac4ba7ab31885137e91eb17edff9148a618ef285a9335469e6d
|
|
BLAKE2b-256 checksum How to use checksums |
83af5f05a3780b9e18979de293cbdbee60b7cf2f36291c03cab3821b3a4a5541
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|
Release files / azappinsights_logger-0.0.8-py3-none-any.whl
| Download URL | azappinsights_logger-0.0.8-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5351d8fa192064ce8915202f7a3f43f32043d8dab810b314c86f9c19d503c874
|
|
BLAKE2b-256 checksum How to use checksums |
9bfbd098905923414653a2b06662651aef8fdb57db65d5fa847b5348117de8cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|
Security for azappinsights-logger 0.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.