@ingestkorea/util-lambda-logger
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@ingestkorea/util-lambda-logger

npm (scoped) NPM downloads

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @ingestkorea/util-lambda-logger

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

4.88 kB

Total Files

6

Last publish

Collaborators

  • ingestkorea