Skip to main content

logger with standard/common format

Project description

📚 About

Centralize log for Python with:

  • UTC time with ISO8601 format.
  • Accency to milliseconds.
  • Json format.
  • Log write to console
  • Log write to specific file location and rotate (optional)

📝 Usage

from jjlog import jjlogger

log = jjlogger("jjapp Log", "./log/jjapp.log")
# log = jjlogger("jjapp Log")   ## Or just output to console
logger = log.getLogger()

logger.info("jj test001")

Output: { 'time':'2022-03-27T14:07:17.456Z','name':'jjapp Log','level':'INFO','message':'log start' }

🔧 Examples:

example code

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

jjlog-0.1.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

jjlog-0.1-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

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