diff --git a/.README.md b/.README.md index ecc1888..4e55669 100644 --- a/.README.md +++ b/.README.md @@ -26,12 +26,20 @@ Head on over to the [documentation](https://oaklabsinc.github.io/oak-tools/) pag The logger is based off [pino](https://github.com/pinojs/pino) and has nearly the same same option parameters. The following example are the default options. ```javascript -const Logger = require('oak-tools').logger -let log = new Logger({ +const { logger } = require('oak-tools') +let log = logger({ level: 'info', stream: process.stdout, pretty: true }) +log.info('sup') +log.error({ + err: new Error('crap...') +}) +log.debug({ + msg: 'debug message here', + now: Date.now() +}) ``` diff --git a/README.md b/README.md index 287425e..3cb40f0 100644 --- a/README.md +++ b/README.md @@ -26,12 +26,20 @@ Head on over to the [documentation](https://oaklabsinc.github.io/oak-tools/) pag The logger is based off [pino](https://github.com/pinojs/pino) and has nearly the same same option parameters. The following example are the default options. ```javascript -const Logger = require('oak-tools').logger -let log = new Logger({ +const { logger } = require('oak-tools') +let log = logger({ level: 'info', stream: process.stdout, pretty: true }) +log.info('sup') +log.error({ + err: new Error('crap...') +}) +log.debug({ + msg: 'debug message here', + now: Date.now() +}) ``` diff --git a/docs/Logger.html b/docs/Logger.html index a056ad4..6442d7e 100644 --- a/docs/Logger.html +++ b/docs/Logger.html @@ -415,7 +415,7 @@
Returns:

diff --git a/docs/Message.html b/docs/Message.html index dbe9f5b..468de17 100644 --- a/docs/Message.html +++ b/docs/Message.html @@ -1309,7 +1309,7 @@
Returns:

diff --git a/docs/WebSocketClient.html b/docs/WebSocketClient.html index 3064220..c46c2c0 100644 --- a/docs/WebSocketClient.html +++ b/docs/WebSocketClient.html @@ -2195,7 +2195,7 @@

ready


diff --git a/docs/WebSocketServer.html b/docs/WebSocketServer.html index 915d9f0..91d9c4c 100644 --- a/docs/WebSocketServer.html +++ b/docs/WebSocketServer.html @@ -1308,7 +1308,7 @@
Type:

diff --git a/docs/global.html b/docs/global.html index cfae667..bfb29ff 100644 --- a/docs/global.html +++ b/docs/global.html @@ -512,7 +512,7 @@
Type:

diff --git a/docs/index.html b/docs/index.html index f6aeba6..7e5c682 100644 --- a/docs/index.html +++ b/docs/index.html @@ -55,7 +55,7 @@

Home

Classes