A logger python project
,-----------------------------------------------------------------v
u ,-~~\ <~)_ u\ /\ ,-. ,-. u
u _,===-., ( \ ( v~\ u u _,===-., \/ <,- \_____/ ` u
u (______,. u\. \ \_/' \u (______,. /__\ / ___. \ -===- u
u _a_a`\\ /\ u \--/ ,_(__/ ,_(__\ u
`--------------------------------------------- By CenturyBoys ----y
This is a non block JSON logger that use python's default logger with a thread executor.
By default loglifos set the default root loger to ERROR level
Settings
You can change loglifos log level using set_config method. Loglifos use the same level constants as the default logging python lib.
import loglifos
loglifos.set_config(loglifos.ERROR)
Using
import loglifos
try:
a = 1 / 0
except Exception as e:
loglifos.debug("Message from debug", "some args", 1, some__kwargs="Kwargs of debug")
loglifos.info("Message from info", "some args", 1, some__kwargs="Kwargs of info")
loglifos.warning("Message from warning", "some args", 1, some__kwargs="Kwargs of warning")
loglifos.error("Message from error", "some args", 1, some__kwargs="Kwargs of error", exception=e)
loglifos.critical("Message from critical", "some args", 1, some__kwargs="Kwargs of critical")
{"time": "2023-01-25 13:27:34.896765", "level": "ERROR", "file": "/home/marco/.config/JetBrains/PyCharmCE2022.3/scratche
s/scratch_1.py", "function": "<module>", "msg": "Message from error", "some__kwargs": "'Kwargs of error'", "args": "('
some args', 1)", "error": "Traceback (most recent call last):\n File \"/home/marco/.config/JetBrains/PyCharmCE2022.3/
scratches/scratch_1.py\", line 9, in <module>\n a = 1 / 0\nZeroDivisionError: division by zero\n"}
{"time": "2023-01-25 13:27:34.899420", "level": "DEBUG", "file": "/home/marco/.config/JetBrains/PyCharmCE2022.3/scratche
s/scratch_1.py", "function": "<module>", "msg": "Message from debug", "some__kwargs": "'Kwargs of debug'", "args": "('
some args', 1)"}
{"time": "2023-01-25 13:27:34.899676", "level": "INFO", "file": "/home/marco/.config/JetBrains/PyCharmCE2022.3/scratches
/scratch_1.py", "function": "<module>", "msg": "Message from info", "some__kwargs": "'Kwargs of info'", "args": "('som
e args', 1)"}
{"time": "2023-01-25 13:27:34.899885", "level": "WARNING", "file": "/home/marco/.config/JetBrains/PyCharmCE2022.3/scratc
hes/scratch_1.py", "function": "<module>", "msg": "Message from warning", "some__kwargs": "'Kwargs of warning'", "args
": "('some args', 1)"}
{"time": "2023-01-25 13:27:34.900066", "level": "CRITICAL", "file": "/home/marco/.config/JetBrains/PyCharmCE2022.3/scrat
ches/scratch_1.py", "function": "<module>", "msg": "Message from critical", "some__kwargs": "'Kwargs of critical'", "a
rgs": "('some args', 1)"}
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 loglifos-0.3.0.tar.gz.
File metadata
- Download URL: loglifos-0.3.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2c4da1f237d0ded8e31d868ed8097bf756780f0b36a832678a4ec42c13e0329
|
|
| MD5 |
4f03b9e87862dca0d8514837bd2dde98
|
|
| BLAKE2b-256 |
57aeea621ee3fad27cda3296f02c4ddcc39b0b547750370e889346bfdcaa6491
|
Provenance
The following attestation bundles were made for loglifos-0.3.0.tar.gz:
Publisher:
publish.yml on CenturyBoys/loglifos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loglifos-0.3.0.tar.gz -
Subject digest:
f2c4da1f237d0ded8e31d868ed8097bf756780f0b36a832678a4ec42c13e0329 - Sigstore transparency entry: 2282053204
- Sigstore integration time:
-
Permalink:
CenturyBoys/loglifos@155bba95a4a855e019e190c3e5b7c0b52f74173b -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/CenturyBoys
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@155bba95a4a855e019e190c3e5b7c0b52f74173b -
Trigger Event:
push
-
Statement type:
File details
Details for the file loglifos-0.3.0-py3-none-any.whl.
File metadata
- Download URL: loglifos-0.3.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcc82252b213b50f8b0b6dc4d8f421b2e87bf05a5d18c688adff6644517e4801
|
|
| MD5 |
b5df38d4be388a6f087591fccefcde2b
|
|
| BLAKE2b-256 |
fd3f5927955cf7e6a95e32b27610cf922369eca9b97364984dfb5971725708c8
|
Provenance
The following attestation bundles were made for loglifos-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on CenturyBoys/loglifos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loglifos-0.3.0-py3-none-any.whl -
Subject digest:
bcc82252b213b50f8b0b6dc4d8f421b2e87bf05a5d18c688adff6644517e4801 - Sigstore transparency entry: 2282053337
- Sigstore integration time:
-
Permalink:
CenturyBoys/loglifos@155bba95a4a855e019e190c3e5b7c0b52f74173b -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/CenturyBoys
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@155bba95a4a855e019e190c3e5b7c0b52f74173b -
Trigger Event:
push
-
Statement type: