@corepartners/logger-package
v1.0.21
Published
This package is a middleware from middy to loging actions and save on DynamoDB
Downloads
46
Readme
Logger
This package is a middleware from middy to loging actions and save on DynamoDB
Documentation
Installation
Install logger-package with npm or yarn
npm i @corepartners/logger-package
yarn add @corepartners/logger-package
Environment Variables
To run this project, you will need to add the following environment variables to your .env file
CLIENT_ID
CLIENT_SECRET
REGION
LOG_TOPIC
Tech Stack
Server: Node
Usage/Examples
if body is buffer set param needParseBody
= true by default is false
import { LoggerMiddleware } from '@corepartners/logger-package'
import middyfy from '@middy/core'
const handler: Handler = async (_event: APIGatewayProxyEvent) => {
//... code
}
export const main = middyfy(handler).use(LoggerMiddleware({ action: 'actions', needParseBody: true }))