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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kicksaw-lambda-logger-0.0.1.tar.gz
.
File metadata
- Download URL: kicksaw-lambda-logger-0.0.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.12 Linux/5.4.0-1063-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e94edbf51d0d7fd2d32018f9bc5c22f55a31b36cb4942f7d6ee688636cfc1b0 |
|
MD5 | 9b28156ac1929e29e4a0fa24157df84f |
|
BLAKE2b-256 | bb40fb3c29235c9b161652a241f39ab20ebae25d77121336c75c4989d6ec2f41 |
File details
Details for the file kicksaw_lambda_logger-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: kicksaw_lambda_logger-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.12 Linux/5.4.0-1063-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1604e4bfea7499a9aeb84e22293953e3900b057c2896cfe7d655fc41fccaf509 |
|
MD5 | d0f897f0b5293a6a2381f9dc6289db3a |
|
BLAKE2b-256 | f12aa9e29b4f450973f9dab969ec577843e1f363c178ce7f7612ac26311e0965 |