Skip to main content

python logging done my way

Project description

stdlogpj

python logging done my way

home: https://github.com/prjemian/stdlogpj

INSTALL

conda install -c aps-anl-tag stdlogpj
conda install -c prjemian stdlogpj
pip install stdlogpj

USAGE:

import stdlogpj
logger = stdlogpj.standard_logging_setup("demo")
logger.info("hello")

DEMO:

#!/usr/bin/env python

import stdlogpj

logger = stdlogpj.standard_logging_setup("stdlogpj-demo")


def thing1(i):
    logger.info(f"something #{i+1}")


def main():
    logger.info("hello")
    for i in range(5):
        logger.debug("calling thing1()")
        thing1(i)
    logger.critical("complete")


if __name__ == "__main__":
    logger.warning("before main()")
    main()
    logger.error("after main(): no error, really")

Project details


Download files

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

Source Distribution

stdlogpj-1.0.0.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

stdlogpj-1.0.0-py2.py3-none-any.whl (1.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file stdlogpj-1.0.0.tar.gz.

File metadata

  • Download URL: stdlogpj-1.0.0.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.4

File hashes

Hashes for stdlogpj-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9707ad877a97642a4588417bdc41a57770297409aadb6e452136ea7bcd7f03d6
MD5 1ca6ef1ded8cb0fa9296ea66075efc5e
BLAKE2b-256 ce89fc490234addd440be17f5826f5f4d336a6cae4f19fc051a5102fb047a23f

See more details on using hashes here.

File details

Details for the file stdlogpj-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: stdlogpj-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 1.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.4

File hashes

Hashes for stdlogpj-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4585e629d3255fbd4c9248f5e2aada0e6780527128090b40c820d1f72bdec484
MD5 de171fb696b2574904e8af8ca10f8e6b
BLAKE2b-256 ebedc24e3071e6649edbea45039b6a15141d93838fb3154b48d03ec2cf9ce679

See more details on using hashes here.

Supported by

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