es6-logger

0.1.1 • Public • Published

es6-logger

Package es6-logger contains basic class which creates log's with custom information about one process in javascript (return of function for example).

How to install package

npm install es6-logger --save-dev

Example of usage.

const {Logger} = require('es6-logger');
const myLogger = new Logger('myLogger');
const sayHelloWorld = () => {
    try {
        console.log('Hello world!');
        myLogger.log(1, 'We said hello to whole world.');
    } catch(error) {
        myLogger.log(1, 'We did not say hello world.', error);
    }
}
 
sayHelloWorld();

Example of log

`Info log:
Function createElement() successfully created element. More about element in data of this log.
---
[object Object]`

Package Sidebar

Install

npm i es6-logger

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

31.5 kB

Total Files

16

Last publish

Collaborators

  • brandund