Python library with helper methods for logging.
init_logging - initializes the logging with a default level, which can be overridden with an environment variable
set_logging_level - sets the logging level of a logging.Logger instance
str_to_logging_level - turns a string logging level into a logging module one, used by init_logging and set_logging_level
logging_level_to_str - turns an int logging level into its string representation
add_logging_level - adds an option for the logging level to an argparse.ArgumentParser instance
add_logger_name - adds an option for a custom name for a logger to an argparse.ArgumentParser instance
log - outputs a logging message to a logger and a specified log file (independent of logger setup)
Changelog
0.0.8 (2026-07-23)
added log method for outputting message via logger and to a specific log file (independent of logger setup)
0.0.7 (2026-07-16)
added level FATAL
added logging_level_to_str to turn int level into string representation
0.0.6 (2026-06-29)
add_logging_level method now allows specifying the default_level
0.0.5 (2025-08-25)
add_logging_level method now allows specifying the destination in the parsed namespace
add_logger_name method now allows specifying the destination in the parse namespace, and either short or long option flag can be specified
0.0.4 (2025-08-25)
add_logging_level method no longer requires short and long option flag to be specified together, one of them can be omitted (ie None)
0.0.3 (2025-01-14)
using underscore in project name now
0.0.2 (2025-01-14)
init_logging now supports specifying stream or filename or handlers as well as the log_format
0.0.1 (2023-11-30)
initial release
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file wai_logging-0.0.8.tar.gz.
File metadata
- Download URL: wai_logging-0.0.8.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2292b9d152477aa89e5a07ad5447471ac4f8cca90ac6cf8731a6455e40bad30a
|
|
| MD5 |
13a8cd214181a00a25c788bd869a2257
|
|
| BLAKE2b-256 |
49c2cd70fdfe6e4d0ed01bb7bff4e4daf073ae1433e8f107e18d1190408d7bc4
|