@ingestkorea/util-simple-logger
v1.0.3
Published
INGESTKOREA Utility Simple Log Handler for Node.js.
Downloads
1
Readme
@ingestkorea/util-simple-logger
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.