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

1.0.20 • Public • Published

Module Logo

Logger System for Nodejs using MongoDB

Build Status Build Status Build Status Packagist JavaScript TypeScript

Installation

$ npm install @jmbl1685/logger

Quick Start

How to use the module? Easy!!

'use strict'

const logger = require('@jmbl1685/logger').default({
  host: '{{your_mongo_connection_string}}',
  logname: 'logs' /* Optional */
})

// You can save anything in the log...
logger({
  ip: '192.168.1.67',
  body: {
    name: 'Juan Manuel',
    lastname: 'Batty Linero'
  },
  response: {
    message: 'User created'
  },
  ...
})

logger({
  transactionDate: Date.now(),
  ...
})
'use strict'

import NodeLogger from '@jmbl1685/logger'

const logger = NodeLogger({
  host: '{{your_mongo_connection_string}}'
})

// You can save anything in the log...
logger({
  body: {
    name: 'Juan Manuel',
    lastname: 'Batty Linero',
    state: true,
    identification: 12345
  }
})

Module Logo

Used modules

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @jmbl1685/logger

Weekly Downloads

1

Version

1.0.20

License

ISC

Unpacked Size

8.95 kB

Total Files

11

Last publish

Collaborators

  • jmbl1685