This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Generic python logging library.

Documentation: https://github.com/SPSCommerce/spylogger

Installation

basic loggers

This installs spylogger only and will load the loggers with no external dependency requirements.

pip install spylogger

pretty loggers

This installs spylogger, pygments, and pygments-json and loads the basic loggers along with pretty loggers.

pip install spylogger[pretty]

Configuration

Environment Variables

Name Description Default
SPY_LOG_LOGGER

The configured logger name. Available loggers:

  • json-flat (Default)
  • json
  • json-src-key
  • pretty
  • pretty-no-meta
  • ugly
json-flat
SPY_LOG_LEVEL The python log level. See the docs WARNING
SPY_SHOW_META Flag for showing the __meta output. True
SPY_JSON_LOG_KEYS

A list of log record keys to put in the __meta section of the log message.

Available Keys:

  • args
  • created
  • exc_info
  • exc_text
  • filename
  • funcName
  • levelname
  • levelno
  • lineno
  • module
  • msecs
  • msg
  • name
  • pathname
  • process
  • processName
  • relativeCreated
  • thread
  • threadName

See the python docs

  • args
  • funcName
  • levelname
  • lineno
  • module
  • pathname
  • process
  • threadName

Pretty Formatter Styles

See the pygments documentation

Environment Variables

Name Default
SPY_LOG_FORMATTER_DEBUG autumn
SPY_LOG_FORMATTER_INFO monokai
SPY_LOG_FORMATTER_WARNING fruity
SPY_LOG_FORMATTER_ERROR default
SPY_LOG_FORMATTER_CRITICAL vs

Available styles

python -c "from pygments.styles import get_all_styles;print list(get_all_styles())"

Usage

from spylogger import get_logger

# get_logger(name=SPY_LOG_LOGGER, log_level=SPY_LOG_LEVEL)
logger = get_logger()

logger.info({'string': 'test Pretty info message.', 'int': 42, 'bool': True})

More examples are in example.py

Authors

See contributors section on GitHub.

Release History

Release History

1.1.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
spylogger-1.1.2.tar.gz (4.8 kB) Copy SHA256 Checksum SHA256 Source Sep 13, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting