1.0.4 • Published 3 years ago

wf-logging-toolbox v1.0.4

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
3 years ago

wf-logging-toolbox

Logging utility library for Node.js Output messages to the default console with log level, timestamp and user

Index

Installation

  • This library/package can be easily installed by running npm install wf-logging-toolbox --save

Dependencies

  • Node modules:
    • moment

Examples

  • Using javascript
const { wfLoggingToolbox } = require('wf-logging-toolbox');

const loggerInUTC = new wfLoggingToolbox(null)
const loggerInEST = new wfLoggingToolbox('America/New_York')

loggerInUTC.info('This is my message', 'my_user')
//Expected result: [INFO] [2022-07-24 19:47:19] [my_user] This is my message

loggerInEST.info('This is my message', 'my_user')
//Expected result: [INFO] [2022-07-24 15:47:19] [my_user] This is my message
  • Using typescript
import { wfLoggingToolbox } from 'wf-logging-toolbox'

const loggerInUTC = new wfLoggingToolbox(null)
const loggerInEST = new wfLoggingToolbox('America/New_York')

loggerInUTC.info('This is my message', 'my_user')
//Expected result: [INFO] [2022-07-24 19:47:19] [my_user] This is my message

loggerInEST.info('This is my message', 'my_user')
//Expected result: [INFO] [2022-07-24 15:47:19] [my_user] This is my message

License

  • This library is licensed under GNU General Public License v.3.0
  • Please check the license content here

Uninstallation

  • This library/package can be easily uninstalled by running npm uninstall wf-logging-toolbox
1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.9.6

3 years ago

0.9.5

3 years ago

0.9.4

3 years ago

0.9.3

3 years ago

0.9.2

3 years ago

0.9.1

3 years ago

0.9.0

3 years ago