Skip to main content

aliyun-sls-logger

aliyun-sls-logger is an implementation of asynchronous Aliyun logging designed to integrate with asynchronous code. This library provides no additional features beyond logging.

Installation

To install aliyun-sls-logger, simply use pip:

pip install aliyun-sls-logger

Usage

To use aliyun-sls-logger, create an instance of the QueuedLogHandler class and add it to your logger. The QueuedLogHandler requires the following parameters:

  • access_key_id: The access key ID for your Aliyun account.
  • access_key_secret: The access key secret for your Aliyun account.
  • endpoint: The endpoint for your Aliyun SLS service.
  • project: The name of the project to log to.
  • logstore: The name of the logstore to log to.

Once you have created an instance of the QueuedLogHandler, you can add it to your logger like any other handler:

from aiologger import Logger
from aiologger.levels import LogLevel
from aliyun_sls_logger.logger_handler import QueuedLogHandler

logger = Logger(name=__name__, level=LogLevel.INFO)
handler = QueuedLogHandler(
    access_key_id='your_access_key_id',
    access_key='your_access_key_secret',
    end_point='your_endpoint',
    project='your_project',
    log_store='your_logstore',
    extract_json=True,
    extract_json_prefix='test_'
)
logger.add_handler(handler)

You can then use the logger as usual:

await logger.info('This is a log message.')

Metadata

Release files for aliyun-sls-logger 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aliyun-sls-logger 0.3.0
File Size Uploaded Provenance Actions
aliyun_sls_logger-0.3.0.tar.gz 17.6 kB Without provenance Details for aliyun_sls_logger-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aliyun-sls-logger 0.3.0
File Interpreter ABI Platform Actions
aliyun_sls_logger-0.3.0-py3-none-any.whl Python 3 none any Details for aliyun_sls_logger-0.3.0-py3-none-any.whl

Total release size: 39.4 kB

Release files / aliyun_sls_logger-0.3.0.tar.gz

Download URL aliyun_sls_logger-0.3.0.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cc909af256c77b58af6bf91f2aa5bd9c8d1cbf2d66f7cc10bf1520db1b606ee2
BLAKE2b-256 checksum
How to use checksums
2af3c01e0ccb99335c0eff2d9f0d294c0d42ed6b26cdb431e62289acd015b260
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.9.5 Windows/10

Release files / aliyun_sls_logger-0.3.0-py3-none-any.whl

Download URL aliyun_sls_logger-0.3.0-py3-none-any.whl
Size 21.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c57c7981beccd70814b38aeebcd3e9c9ad8212024438e57aa4c58ccd457f4ee8
BLAKE2b-256 checksum
How to use checksums
fedec465cb250804c6b71209d95c1f1a4626e0012077ca81f3297cb3bd1e9d6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.9.5 Windows/10

Security for aliyun-sls-logger 0.3.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page