python-cloud-logger
A logger with thread local storage for logging context in all logs without repeating the code. This is a json logger where some contextual fields need to be included in every log per request/thread in a safe and efficient way.
Note that, all the loggers retrieved on that particular thread ( by using logging.getLogger ) will inherit the context.
Usage
from pythoncloudlogger import *
logger=logging.getLogger("myapp-logger")
logger.updateContext({
"requestId" : "1245"
})
logger.info("Request successfully processed")
logger.clearContext()
Release files for python-cloud-logger 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python-cloud-logger-0.0.4.tar.gz | 2.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_cloud_logger-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.1 kB
Release files / python-cloud-logger-0.0.4.tar.gz
| Download URL | python-cloud-logger-0.0.4.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8fd1e173807e26fda1fcf4e73254dc5492ffe7ae467cb47197a6ad76ba80000
|
|
BLAKE2b-256 checksum How to use checksums |
0efcecce66580af8f4d61e3b070e5371feee7bd6b526e40dacf5f5916431b641
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4
|
Release files / python_cloud_logger-0.0.4-py3-none-any.whl
| Download URL | python_cloud_logger-0.0.4-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08d576e388f6ebc2eb85d0d313c186925e9af35cf98e3e09968aebc098625f37
|
|
BLAKE2b-256 checksum How to use checksums |
3d03afe763f1437b20bb88e839781810c12cab89f11b30c830bb6533e7b2b4a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4
|