0.1.16 • Published 10 years ago

trk-log v0.1.16

Weekly downloads
96
License
-
Repository
-
Last release
10 years ago

Just:

var trk = require('trk-log').init(settings);

Where: settings is an optional object with various settings (since under development), including:

trk.test('shubi'); //will set test event (new custom event) with "shubi". trk.info('dubi'); //will set info event (console only) with "dubi". trk.notice('zubi'); //will set notice event with "zubi" and then will notify (as you overrided it) about it to "http://log.test.com:4000/log" (again, as you explicitly override it) using post. trk.error('rubi'); //will error event (console) with "rubi" and then will send it to "http://test.com:4000/log" using post.

More:

Default levels are available inside index.js and you can override them, as mentioned above, if you want: var levels = {name: 'info', color: 'green', notify: false, console: true}, {name: 'notice', color: 'yellow', notify: false, console: true}, {name: 'error', color: 'red', notify: true, console: true}

P.S: If you use multi file app or handling production and development envs, I suggest set external module for the logging settings and init.

This package is on ALPHA mode and I recommend not using it for now.

0.1.16

10 years ago

0.1.15

10 years ago

0.1.14

10 years ago

0.1.13

10 years ago

0.1.12

10 years ago

0.1.11

10 years ago

0.1.10

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago