Skip to main content

A customized loger for seamlessly logging on an AWS Lambda or local environment, with reporting in Sentry and other logging-related featues

Project description

kicksaw-lambda-logger

This is intended for use with Kicksaw's integration projects and our other open-source libraries like pycm. However, these aren't hard dependencies.

Usage

from kicksaw_lambda_logger import get_logger

logger = get_logger(__name__)

logger.info("Logging is fun!")

Environment variables

There are two environment variables this library makes use of:

  • STAGE
  • LOG_LEVEL

STAGE represents your deployment environment, e.g., production, development, local, or test. This affects which logging mechanism the library uses under the hood.

LOG_LEVEL represents the log level, e.g., DEBUG, INFO, WARNING, or ERROR.

Sentry

As this library grows, we'll be adding more helper methods for reporting in Sentry. For now, you can send an exception to Sentry without your code dying by using send_exception_to_sentry.

Future plans

  • Write all logs to tmp so that other reporting tools can sweep the logs and do something with them
  • Add moe Sentry features
  • Pass in stage and level from outside?

This project uses poetry for dependency management and packaging.

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

kicksaw-lambda-logger-0.0.1.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

kicksaw_lambda_logger-0.0.1-py3-none-any.whl (2.4 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