Skip to main content

asynclogger

A lightweight and efficient asynchronous logging package for logging messages to the console and files. Supports colored output, dynamic log paths, and customizable log levels.

Features

  • Asynchronous Logging: Non-blocking logging for improved performance.
  • Console and File Logging: Supports simultaneous logging to console and files.
  • Colored Output: Differentiates log levels using colors for better readability.
  • Dynamic Log Paths: Change log file paths dynamically without restarting.
  • Custom Log Levels: Define and configure custom logging levels.

Installation

pip install asynclogger

Usage

Basic Example

from asynclogger import logger

logger.config('./logs/test.log', log_to_console=True)

async def main():
    await logger.info('Hello, world!')

if __name__ == '__main__':
    asyncio.run(main())

Configuration Options

Option Type Default Description
log_format String {isoformat} {group} {level} {message} Format used for logging messages.
output List ["console"] Specifies outputs.
colorize Boolean or Dict True Takes either a boolean or a dict specifying a color for each log level.
wrapper Dict {} Contains a dict of wrapper functions for each format variable (isoformat, group, level ...).

Dynamic Log Path Change

logger.config('./logs/%Y/%B/{safedate}.log', log_to_console=True)

Custom Log Levels

await logger.log('custom', 'This is a custom log level message')

Coloring Output

from colorist import Color

logger.config('./logs/test.log', log_to_console=True, colorize={
    'ERROR': Color.GREEN
})

Wrapping Variables

logger.config('./logs/test.log', log_to_console=True, wrapper={'group': lambda x: f'({x})'})

License

MIT

Metadata

Release files for asynclogger 0.1.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 asynclogger 0.1.0
File Size Uploaded Provenance
asynclogger-0.1.0.tar.gz 3.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for asynclogger 0.1.0
File Interpreter ABI Platform
asynclogger-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.0 kB

Release files / asynclogger-0.1.0.tar.gz

Download URL asynclogger-0.1.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d70a758ad010ccc0fb68d65cf4b4d1ebe9ede1ed281e8648d6088aa97d86c11f
BLAKE2b-256 checksum
How to use checksums
26bbc7860de2eba280bf99136f0893fe86c140de7f6bdfa52e639d981c669539
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2025.

Transparency log

Release files / asynclogger-0.1.0-py3-none-any.whl

Download URL asynclogger-0.1.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ed764b6e93e4e71611c822018653c61d751d0d1c68622967d7cbbb59b309abb
BLAKE2b-256 checksum
How to use checksums
7d0f681fc5cdb79b50bc723354db0018d92af9d590067fcd1f9f0b74143d7b34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2025.

Transparency log

Security for asynclogger 0.1.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for asynclogger-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 23, 2025.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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