Skip to main content

Lightweight logging utility for python. Wrapper around stdlib

Project description

kLogs

Small logging utility for uniform format, color

Features:

  • Easy to use log format language
  • Search
  • Open source at line
  • log and assert

Installation

pip install klogs-util

Usage

    from klogs import get_logger
    log = get_logger(tag, level, outfile)
    log.debug("debug statement")
    log.info("info statement")
    log.warning("warning statement")
    log.error("error statement")
    log.critical("critical statement")

Output:

<tag> - DEBUG - debug message (test.py:7)
<tag> - INFO - info message (test.py:8)
<tag> - WARNING - warning message (test.py:9)
<tag> - ERROR - error message (test.py:10)
<tag> - CRITICAL - critical message (test.py:11)
Stack (most recent call last):
  File "/Users/kevin/coding/kLogs/test.py", line 26, in <module>
    test(args.file, args.level)
  File "/Users/kevin/coding/kLogs/test.py", line 11, in test
    log.critical("critical message")

Or

    log()
    x = 10
    log(x)

Which will produce:

   <tag> - INFO -  (test.py:12)
   <tag> - INFO - x | 10 (test.py:14)

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

klogs_util-0.1.2.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

klogs_util-0.1.2-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file klogs_util-0.1.2.tar.gz.

File metadata

  • Download URL: klogs_util-0.1.2.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for klogs_util-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7011dd42910648e72fbffc3c97db3571c1b5435ae848930847d81cce344bbeef
MD5 8ef5b0cdaab03fd0001ced11255d22aa
BLAKE2b-256 13f8f00ed317197719535fc131c370c4f5f325115582c021ae1a22b03dbf6283

See more details on using hashes here.

File details

Details for the file klogs_util-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: klogs_util-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for klogs_util-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c7f87ea3aa041dc326a618ffcaf737902a8500cf9a8dc66f224af574299edc86
MD5 83064772162740caf350d5cbfdf5ee2c
BLAKE2b-256 becee3026f6887d611f3c7317b5576d43d87d5c3d71713da1ae3b257296949d6

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