Skip to main content

# python setup.py sdist bdist_wheel

# twine upload dist/*

from awslogger import CloudWatchLogger

import logging



# Replace 'your_aws_key' and 'your_aws_secret' with actual values

# Create an instance of the CloudWatchLogger class

logger = CloudWatchLogger(ACCESS_KEY, SECRET_KEY, REGION_NAME)

logger.set_log_level(logging.ERROR) # Set logging level to INFO



log_group_name = 'my-log-group'

log_stream_name = 'my-log-stream'

logger.create_log_group(log_group_name)

logger.create_log_stream(log_group_name, log_stream_name)





function_name = 'Test function'



# # Log at different levels

logger.put_log_event(log_group_name, log_stream_name, "This is info message.", function_name, log_level=logging.INFO)

logger.put_log_event(log_group_name, log_stream_name, "This is debug message.", function_name, log_level=logging.DEBUG)

logger.put_log_event(log_group_name, log_stream_name, "This is warning message.", function_name, log_level=logging.WARNING)

logger.put_log_event(log_group_name, log_stream_name, "This is critical message.", function_name, log_level=logging.CRITICAL)

logger.put_log_event(log_group_name, log_stream_name, "This is error message.", function_name, log_level=logging.ERROR)



Metadata

Release files for awscloudwatchlogger 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for awscloudwatchlogger 0.2
File Size Uploaded
awscloudwatchlogger-0.2.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for awscloudwatchlogger 0.2
File Interpreter ABI Platform
awscloudwatchlogger-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / awscloudwatchlogger-0.2.tar.gz

Download URL awscloudwatchlogger-0.2.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
631f83419c7cb8454e1739128206b17296b5ae397bac93716a9d86e255baab29
BLAKE2b-256 checksum
How to use checksums
ed388a5146b27a633f9b13351874b1e8afbade5f1c658ec9a345ef3d4cca24a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.0

Release files / awscloudwatchlogger-0.2-py3-none-any.whl

Download URL awscloudwatchlogger-0.2-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15bc461b964c7fcf4bae2c54f35e7118893b09d785303733ef3173c56598f026
BLAKE2b-256 checksum
How to use checksums
134acd5839dc2fb4eab4c1cee658d4350bc12a6dd94b7f89d3765a6e974c20a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.0

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page