Python configuration package
Project description
Logging
This module injects into method a logger object and try to inspect and log input parameters and method result and/or error in a pretty way as a hierarchical tree of calls. Can be used both for sync and async methods.
Examples:
-
configuration:
from logger import Logger, LogTypes, Console, File, LogContext, logging logger = Logger( type=[ LogTypes.debug, LogTypes.info, LogTypes.warning, LogTypes.error ], outputs=( Console( enabled=True ), File( enabled=True, path='./logs', name='log.ext' ) ) ) # as global logger ---- from tools.configurator import Config, ConfigNode # config load Config.globals = ConfigNode() Config.globals.logger = logger # as logging context ---- from tools.logging import LogContext log_ctx_token = LogContext.set(logger=logger) # some code # at the end LogContext.reset(token=log_ctx_token)
use for logs:
from logging import logging @logging(prefix=__name__) def some_method(): some_method.logger.debug( obj='some debug info', prefix='!!! > ', # object prefix if needed date_: True, # add date before log message indent: True, # all logs from begin of start row or as hierarchy tree end_line: 1 # 0 - no end of line ) # method logic here pass
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ruth_logger-2022.0.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: ruth_logger-2022.0.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 231.6 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aef59340db658248c6624b8e63af3036629551d90c4ebd8c9f78f8274777fade
|
|
| MD5 |
a7864e54e5b230c1eed3f100a6082c7b
|
|
| BLAKE2b-256 |
1f73dfab7ee08ccdf2910796504b90d1739147b8dfe77128e2323c1fbac2a1d5
|
File details
Details for the file ruth_logger-2022.0.0-cp313-cp313-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: ruth_logger-2022.0.0-cp313-cp313-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8efee25a1cc1a6e47fde2773fac6cf4c50d16669916a916f1bb04bf7a6dc243
|
|
| MD5 |
dd436f3468a234204eee666b10d357cb
|
|
| BLAKE2b-256 |
03c847561147c933ac0a3c283332f71e86a9427d3960729b0e1f9004de1b1a88
|
File details
Details for the file ruth_logger-2022.0.0-cp313-cp313-musllinux_1_2_i686.whl.
File metadata
- Download URL: ruth_logger-2022.0.0-cp313-cp313-musllinux_1_2_i686.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a93e7a26f28b8415821034912dd3ac051581b51bc2df1d3cffe6c45846dab6c2
|
|
| MD5 |
6301ff7a08080162c50b440a3c713a26
|
|
| BLAKE2b-256 |
f453c0894b6f33406195ec82bafe3f6807a382f831346475fce39f376229cf86
|
File details
Details for the file ruth_logger-2022.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: ruth_logger-2022.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd3d523f42d0d23a5f522309764d03d02bacc463d07a4b1f59632d466fefbf54
|
|
| MD5 |
67d71e7f2cd4e57793a65a0eb1e5eb11
|
|
| BLAKE2b-256 |
9e231a19af764e94a1a08b30284b179c3773ef8868ca9a58c75b4a9f479d4429
|
File details
Details for the file ruth_logger-2022.0.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: ruth_logger-2022.0.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 252.4 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7025ac0c849bfd2889a812cd05131bbd5ba3127296c02a92fdf655b953a3544d
|
|
| MD5 |
e1117be44ddc15ebe9e87c150c59eacd
|
|
| BLAKE2b-256 |
b9a678f6951ef3f1d9fbb90799d8a536b73fc3ae61d5831e6c41be3d8ef1a559
|
File details
Details for the file ruth_logger-2022.0.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: ruth_logger-2022.0.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 234.3 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fa2d5a33646d989f94aa834487e83bbcb36dd1b85cd198932720252414406b1
|
|
| MD5 |
049e5c734848c51f07e15b2475f8eba6
|
|
| BLAKE2b-256 |
00eae840f8a3d25250098202a92dd1b7ffccc703487a4e4c54859e6b97839630
|
File details
Details for the file ruth_logger-2022.0.0-cp312-cp312-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: ruth_logger-2022.0.0-cp312-cp312-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce3903fa534cc74df28f682b575ddf9f815fde499c43f5427fe8c2d39a454536
|
|
| MD5 |
6b3b93be89d0efefaa2fd978310e7720
|
|
| BLAKE2b-256 |
19d51ad9a6abd23fa992c604de2f26914afe71f50eec8a83c893b8377924ac81
|
File details
Details for the file ruth_logger-2022.0.0-cp312-cp312-musllinux_1_2_i686.whl.
File metadata
- Download URL: ruth_logger-2022.0.0-cp312-cp312-musllinux_1_2_i686.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5554e036bf94a85f9305a5b64abf432bda1e90c5e25b5f08359f24a36c3df535
|
|
| MD5 |
7c83f3a580adb084f88c6811d182568e
|
|
| BLAKE2b-256 |
d13cd964f056a8cd1c5a84afef8140278f0736aa1d50e3585fcc6bd582a51c21
|
File details
Details for the file ruth_logger-2022.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: ruth_logger-2022.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28e4c511340213b33a24029bc725a8c35f97aba24fed17ddd2701f8c750052e8
|
|
| MD5 |
c302f55ee0a5e3b0dd9a5d5674740154
|
|
| BLAKE2b-256 |
0ca058b448005f2ace34ab39c53007c6e61915bc77873b841abdfa8f1bf86e19
|
File details
Details for the file ruth_logger-2022.0.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: ruth_logger-2022.0.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 254.8 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d6ad4cd371b9e97dc4fb0fcde9d108a8518fdfcfe663bb62db56d080ca948c7
|
|
| MD5 |
0ca3f105176ae155650357cb75f872f9
|
|
| BLAKE2b-256 |
81fbc4ae4e3d4a137e45761800d0d11cf2bf24e63fdd1150d705c8100c48d062
|
File details
Details for the file ruth_logger-2022.0.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: ruth_logger-2022.0.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 242.4 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74f7c8fd23c555ddfe0af32b01c5685b20c78bd88b9a19ecb89ab12cfd9ad047
|
|
| MD5 |
c8fa0dade66f34b92c934e510e2cee94
|
|
| BLAKE2b-256 |
b22368d5bdd973401a84a429fb8c22a3a5fd54fdfe1675ebfb6b1b39e2be40aa
|
File details
Details for the file ruth_logger-2022.0.0-cp311-cp311-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: ruth_logger-2022.0.0-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc8a4543fec04f5fe7aa177d928b285e8dcf5a6950113ace990cbc2372b09d84
|
|
| MD5 |
0bd41b01162c80f897574055ca9cd015
|
|
| BLAKE2b-256 |
8d0d907a967b1e15705f72c4a065ac881b7b01151e09114cb446812a6d99b016
|
File details
Details for the file ruth_logger-2022.0.0-cp311-cp311-musllinux_1_2_i686.whl.
File metadata
- Download URL: ruth_logger-2022.0.0-cp311-cp311-musllinux_1_2_i686.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.11, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
347bd743bbe6158d74ef837c11549d3acceb236b3b5358dd1468ddf139649be0
|
|
| MD5 |
6ecf7ee781126375f146928cc103bd79
|
|
| BLAKE2b-256 |
0d8220d135af01a65fdd48bcdf081801fe393c51c5fc043d923fa2724266d1f0
|
File details
Details for the file ruth_logger-2022.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: ruth_logger-2022.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a9f28a777e468d9567f30f69a85356ff74523c4c885479066a1408947a98338
|
|
| MD5 |
74fdccece6cafd3754b906902e7ea694
|
|
| BLAKE2b-256 |
32eb9b99248ddc56c6ad65e1686adf5d96517de931c09b7e47cbb78a02e1f884
|
File details
Details for the file ruth_logger-2022.0.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: ruth_logger-2022.0.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 254.9 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d363e3d077ca6d00a1938c90cf67f558966da3c5effdc4387182caf139feee3
|
|
| MD5 |
cfc760e2f779853abce26b1637e04ee1
|
|
| BLAKE2b-256 |
7188b9ec304cec0abd68582e70b467d699d5a15dd9655dc0127382de9f6e449a
|