1.0.3 • Published 1 year ago

@ingestkorea/util-simple-logger v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@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.

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago