Format-Logger
Format Logger allows you to have a nice looking log, with relevant information as function and time, and calculate the elapsed time during the functions, with a easy to use structure.
Install
pip install format-logger
Example
from format_logger.logger import logger
def foo_function(log : logger) -> None:
log = log.start_function("foo_function")
log.INFO("Hello World!")
time.sleep(1)
log.end_function()
if __name__ == "__main__":
log = logger("logger_example", "main")
foo_function(log)
log.end_function()
Output:
logger_example | main | 2024-10-09 17:19:18.563839 | INFO | Starting function main at 2024-10-09 17:19:18.563839
logger_example | foo_function | 2024-10-09 17:19:18.563839 | INFO | Starting function foo_function at 2024-10-09 17:19:18.563839
logger_example | foo_function | 2024-10-09 17:19:18.563839 | INFO | Hello World!
logger_example | foo_function | 2024-10-09 17:19:19.564759 | INFO | Function foo_function ended - time 1.00092 Seconds
logger_example | main | 2024-10-09 17:19:19.564759 | INFO | Function main ended - time 1.00092 Seconds
Metadata
Release files for format-logger 0.0.5
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 | Actions |
|---|---|---|---|---|
| format_logger-0.0.5.tar.gz | 3.2 kB | Without provenance | Details for format_logger-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| format_logger-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for format_logger-0.0.5-py3-none-any.whl |
Total release size: 6.7 kB
Release files / format_logger-0.0.5.tar.gz
| Download URL | format_logger-0.0.5.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11a38b1c8a990091ea974fdcd305f98d57e45c3078c7346271d81572ec95319b
|
|
BLAKE2b-256 checksum How to use checksums |
a5097fd5af773d0da7076c5d52936609e4547fb2490efec717663ec5260f1664
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.3
|
Release files / format_logger-0.0.5-py3-none-any.whl
| Download URL | format_logger-0.0.5-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c48db7c25deab83c576e911bc601ef006e2c260fabef55ec2cc4710930c93210
|
|
BLAKE2b-256 checksum How to use checksums |
aded892e686148fe8a228d8803d48befd4242be5a124177541e16248e5ef4e83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.3
|
Security for format-logger 0.0.5
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.