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

1.0.3 • Public • Published

@ingestkorea/util-simple-logger

npm (scoped) NPM downloads

Description

INGESTKOREA Utility Simple Log Handler for Node.js.

Installing

npm install @ingestkorea/util-simple-logger

Getting Started

Pre-requisites

  • Use TypeScript v4.x

Import

// ES5 example
const { simpleLoggerClient } = require('@ingestkorea/util-simple-logger');
// ES6+ example
import { simpleLoggerClient } from '@ingestkorea/util-simple-logger';

Usage

Set Title, Message

const title = 'Sample Title';
const message = JSON.stringify({
    requestId: "27af36a4af4254bd0106a0e1c49bc513",
    statusCode: 202,
    statusName: "success",
}, null, 2);

Async/await

(async () => {
    const params = {
        title: title, // required
        message: message, // required
        mode: 'KST' // optional
    };
    await simpleLoggerClient.resolve(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-simple-logger

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

8.86 kB

Total Files

9

Last publish

Collaborators

  • ingestkorea