-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix reconnection * ConnectionPool typo --------- Co-authored-by: sheldhur <[email protected]>
- Loading branch information
Showing
3 changed files
with
73 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,24 @@ | ||
'use strict' | ||
|
||
const pino = require('pino')() | ||
|
||
pino.info('hello world') | ||
pino.error('this is at error level') | ||
pino.info('the answer is %d', 42) | ||
pino.info({ obj: 42 }, 'hello world') | ||
pino.info({ obj: 42, b: 2 }, 'hello world') | ||
pino.info({ obj2: { aa: 'bbb' } }, 'another') | ||
setImmediate(function () { | ||
pino.info('after setImmediate') | ||
const pinoJs = require('pino') | ||
const elastic = require('./lib')({ | ||
index: 'pinotest', | ||
node: 'http://localhost:9200', | ||
auth: { | ||
apiKey: 'someKey' | ||
}, | ||
consistency: 'one', | ||
'es-version': 7, | ||
'flush-bytes': 1000 | ||
}) | ||
pino.error(new Error('an error')) | ||
|
||
const child = pino.child({ a: 'property' }) | ||
child.info('hello child!') | ||
|
||
const childsChild = child.child({ another: 'property' }) | ||
childsChild.info('hello baby..') | ||
|
||
pino.debug('this should be mute') | ||
|
||
pino.level = 'trace' | ||
|
||
pino.debug('this is a debug statement') | ||
|
||
pino.child({ another: 'property' }).debug('this is a debug statement via child') | ||
pino.trace('this is a trace statement') | ||
const level = 'trace' | ||
const pino = pinoJs({ level }, pinoJs.multistream([ | ||
{ level, stream: elastic }, | ||
{ level, stream: process.stdout } | ||
])) | ||
|
||
pino.debug('this is a "debug" statement with "') | ||
pino.trace('test') | ||
setInterval(function () { | ||
pino.trace('test') | ||
}, 10000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters