send line message notification, support aws lambda
Project description
PynamoLogger
log information into a dynamodb, with dax support
Install
pip install pynamologger
view Documentation
Usage
class meta definition
from pynamoLogger.logger import PynamoLogger
class Logger(PynamoLogger):
class Meta:
table_name = 'member-database-log-dev-manual'
region = 'ap-southeast-1'
billing_mode = 'PAY_PER_REQUEST'
# Logger.create_table()
Logger.log(appName = 'test', message = "this is crazy", responseObject = {'response': 'null response'})
{'logId': 1603075789.054751,
'saveResult': {'ConsumedCapacity': {'CapacityUnits': 1.0,
'TableName': 'member-database-log-dev-manual'}}}
Logger.checkLog(appName = 'test', logId = '1603074235.103042')
[{'appName': None,
'timestamp': 1603074235.103042,
'logMessage': 'this is crazy',
'requestObject': {'noValue': 'noValue'},
'responseObject': {'response': 'null response'}}]
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
pynamoLogger-0.0.1.tar.gz
(9.6 kB
view hashes)
Built Distribution
Close
Hashes for pynamoLogger-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5436a2aa0502c6dc6c78024e56f1c703e3ba2b73c1dba915f9788f86e5f8c11 |
|
MD5 | 5f28d90a9ad407d248b0393305540944 |
|
BLAKE2b-256 | 2f2996a013e593d1e51bd0f8538aface48593ae368e56e69d4a1021b9d6ef4a4 |