Skip to main content

json logger, very helpful for developers at developing stage

Project description

py_logger

installation through PyPi

pip3 install json-dev-logger
in a project:

import py_logger

mylogger = py_logger.setup_logger()
mylogger.info("test")

example of a record:

{"level": "INFO", 
 "time": "2025-03-26 19:48:07,797", 
 "message": "test", 
 "name": "jsonLogger", 
 "filename": "1.py", 
 "lineno": 4, 
 "pathname": "/home/username/git/dbaas/py_logger/1.py", 
 "reponame": "py_logger\n", 
 "branch": "* master\n", 
 "modified_files": " M README.md\n"}

locally:

to add:

git submodule add git@github.com:Areso/py_logger.git
git submodule update --init

to update:

git submodule update --remote
git commit -am "Upgraded dependency"

to downgrade:

cd path/to/submodule_dir/within/the?repo
git reset --hard <commit_hash_or_tag>
cd ..
git commit -am "Downgraded dependency"
git push

on a remote:

git submodule init
git submodule update --init

to use inside your code

from py_logger.py_logger import setup_logger
...

logger_c = setup_logger()
logger_c.info("Program has started")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

json_dev_logger-0.0.11-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file json_dev_logger-0.0.11-py3-none-any.whl.

File metadata

File hashes

Hashes for json_dev_logger-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 1872393b216cf11d896f5ecffd8fa193df7ad078f13083211c04a8b90e01b500
MD5 dbc6290e08b5cb57ab2339554575349d
BLAKE2b-256 fcff345c5206eaae607f37d7e3a6daff4bae05ee8065e4d9ec8868406a83137a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page