0.1.16 • Published 8 years ago

trk-log v0.1.16

Weekly downloads
96
License
-
Repository
-
Last release
8 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

8 years ago

0.1.15

8 years ago

0.1.14

8 years ago

0.1.13

8 years ago

0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago