@ingestkorea/util-lambda-logger
v1.0.0
Published
INGESTKOREA Utility Lambda Log Handler for Node.js.
Downloads
8
Readme
@ingestkorea/util-lambda-logger
Description
INGESTKOREA Utility Lambda Log Handler for Node.js.
Installing
npm install @ingestkorea/util-lambda-logger
Getting Started
Pre-requisites
- Use TypeScript v5.x
npm install -D typescript # save dev mode
Import
// ES5 example
const { lambdaLogger } = require("@ingestkorea/util-lambda-logger");
// ES6+ example
import { lambdaLogger } from "@ingestkorea/util-lambda-logger";
Usage
Async/await
// Set Label, Message
import { lambdaLogger, LambdaLoggerInput } from "@ingestkorea/util-lambda-logger";
(async () => {
let params: LambdaLoggerInput = {
label: "INFO", // optional "INFO" | "ERROR"
message: "hello world", // required Object | String
};
await lambdaLogger(params);
})();
License
This Utility is distributed under the MIT License, see LICENSE for more information.