Matteo Collina
a71fdd5016
Do not leak files when running tests ( #1395 )
...
* Do not leak files when running tests
Signed-off-by: Matteo Collina <hello@matteocollina.com>
* Update test/helper.js
Co-authored-by: James Sumners <james@sumners.email>
Co-authored-by: James Sumners <james@sumners.email>
2022-04-06 15:12:16 +02:00
Sameer Srivastava
43906c71e7
Fixes issue with nested keys ( #1198 )
...
* fix: fixes issue with nested keys
* chore: use strictSame in nested key test
2021-10-29 15:10:35 +02:00
Sameer Srivastava
f16c98d7d7
Fix max-depth using safe-stable-stringify ( #1169 )
...
* fix: max-depth specified for stringifying
* chore: Added options to set custom limits
* chore: removed console.log
* chore: per-base-logger safe stringify
* types removed
docs updated
* unused json-stringify-safe removed
* test for non circular objects
* chore: updated docs
* chore: doc update for arrays
2021-10-26 14:26:14 +02:00
Matteo Collina
16f1f0a66d
Replace fast-safe-stringify with json-stringify-safe ( #1066 )
...
Fixes https://github.com/pinojs/pino/issues/1062
2021-07-12 14:22:23 +02:00
Matteo Collina
98114238fb
removed all outstanding deprecations ( #1057 )
2021-07-08 12:04:32 +02:00
Matteo Collina
3c0613a291
Merge branch 'master' into next
2021-05-22 15:43:31 +02:00
mihai1voicescu
75a54cf427
Make the nestedKey only take effect in the serialized object and fix … ( #885 )
...
* Make the nestedKey only take effect in the serialized object and fix error detection and serialization (closes #883 )
proto.js
* Copy the message property in case the obj is an error and there is a msg specified
* Load the msg as a property of obj if metadata is needed
symbols.js
* Add nestedKeyStrSym to quickly cache the string
tools.js
* Manually build the stringify for performance reasons (not too pretty...)
error.test.js + serializers.test.js
* Add a test for the new nestedKey interaction
* Add tests to complete the coverage
* Address PR notes
* Fix test title
* Fix tests
Co-authored-by: Mihai Voicescu <mihaivo@intern.pch>
2021-05-19 10:00:13 +02:00
Matus Sabo
379e57cbc8
fix: prettyPrint options - misleading error message with wrong option value ( #1012 )
...
* fix: prettyPrint options - misleading error message with wrong options value
* fix: rewrite throws in tests - remove unnecessary code and make code more readable
2021-04-16 17:30:11 +02:00
Matteo Collina
cba70129a8
Merge branch 'master' into next
2021-04-06 18:45:21 +02:00
James Sumners
df893a77c5
Update to tap v15 ( #999 )
2021-04-01 12:44:40 -04:00
mihai1voicescu
c22d0a9d44
Merge error flows. ( #923 ) ( #924 )
...
* Apply err serializer everywhere. (#896 )
* Apply err serializer everywhere.
* Handle cases where the err serializer is not set
* Added docs
* Typo
* Merge error flows. (#923 )
Merge the 2 error flows:
* if obj is of type Error wrap it in `{ err }`
* if msg not present set to error message (if present)
Update tests. Update API doc
* Check for undefined value instead of falsy ones
Co-authored-by: Matteo Collina <hello@matteocollina.com>
Co-authored-by: Mihai Voicescu <mihaivo@intern.pch>
2021-01-04 10:31:34 +01:00
Matteo Collina
98af5e782c
Support Babel/Typescript "faux modules" as well as native ESM ( #936 )
...
Fixes #935
2020-12-11 15:50:09 +01:00
James Sumners
f8bf228056
Revert "Avoid data loss with conflictig 'msg' values. ( #876 )"
...
This reverts commit d5a13227f91a66ba04fbd713c4a08b46e8a1f991.
2020-07-31 18:16:07 -04:00
Mark Stosberg
d5a13227f9
Avoid data loss with conflictig 'msg' values. ( #876 )
...
If msg appears as a string and in the object, preserve it as "originalMsg"
Before, the `msg` copy in the the object was lost.
2020-07-15 17:57:49 +02:00
Linus Unnebäck
6e215024bd
Use object shorthand for properties ( #830 )
2020-04-26 13:12:33 +02:00
James Sumners
486f30a0e5
Remove implicit appending of objects to message strings
2020-03-23 18:17:19 -04:00
Tomas Della Vedova
f3ab176c90
Add formatters for core log components ( #775 )
...
* WIP: added bindings and levels serializers
* Addressed comments
* Fixed test
* Moved from custom srializers to formatters
* Use stricter check in genLsCache
* Updated test
* Addressed comments
* Added log formatter and removed pino.* serializer
* Updated test
* Use factory for formatters object
* Added deprecations messages
- deprecated useLevelLabels
- deprecated changeLevelName
- deprecated pino.* serializer
* Updated test
* Addressed comments
* Fix test
* Improve code coverage
* Fixed levelKey handling
* Updated test
* Addressed comments
* Updated test
* Added formatters benchmarks
* Rename test
* 100% code coverage
* Added formatters to benchmark runner
* Updated documentation
* Update docs/api.md
Co-Authored-By: James Sumners <james@sumners.email>
* Update docs/api.md
Co-Authored-By: James Sumners <james@sumners.email>
* Update docs/api.md
Co-Authored-By: James Sumners <james@sumners.email>
* Update docs/api.md
Co-Authored-By: James Sumners <james@sumners.email>
* Update docs/api.md
Co-Authored-By: James Sumners <james@sumners.email>
* Update docs/api.md
Co-Authored-By: James Sumners <james@sumners.email>
* Addressed comments
Co-authored-by: James Sumners <james@sumners.email>
Co-authored-by: Matteo Collina <hello@matteocollina.com>
2020-03-18 14:18:02 +01:00
Thiebaud Thomas
254d485f61
Remove log version ( #623 )
2020-02-17 10:40:00 +01:00
Matthew Adams
5d35a08d86
objectKey -> nestedKey, no "you" in docs
2020-01-07 11:06:14 -06:00
Matthew Adams
be9464a4a5
support objectKey config
2020-01-06 18:46:42 -06:00
Erik Larsen
1586df37ee
feat(bindings): allow setting of bindings ( #754 )
...
* feat(bindings): allow setting of bindings
* test(bindings): parent-child setBindings tests
* test(bindings): additional parent bindings check
2019-12-13 16:18:15 -05:00
Vincent LE GOFF
6fe7476f9a
CI : Move from sleep to watch exists ( #748 )
...
* Extend sleep for windows tests
* move from sleep to watch
* Review
* fix empty files behaviour
2019-12-02 10:03:30 +01:00
Vincent LE GOFF
29a2419bec
CI : Github action improvement ( #744 )
...
* enhance sleep
* adding coverall
* add cov-ci
* review
2019-11-18 23:58:09 +01:00
Zirak
a953c77086
Handle formatting a Symbol
...
Bump up the minimum `quick-format-unescaped` version, and test passing a
Symbol as a format argument.
Fix #715 .
2019-10-01 19:04:20 +00:00
Matteo Collina
c5c996d240
Updated to standard v13 ( #683 )
2019-07-17 15:09:01 +02:00
Matteo Collina
7fb388f5ab
Remove the msg property after logging
2019-04-04 15:37:15 +02:00
Krisztina Hirth
e3866516b1
Fix bug Global serializer not invoked for strings when base: null ( #597 )
...
* Fix bug Global serializer not invoked for strings when `base: null`
* Remove unused symbol
* remove sting interpolation
Co-Authored-By: yellowbrickc <yellowbrickc@users.noreply.github.com>
* Instead of cloning the object parameter, the messageKey prop will be set if needed.
2019-03-27 11:45:37 +01:00
Thomas Thiebaud
1ac1576e70
Fix message precedence over mergedObject
2019-03-22 15:50:31 +01:00
yellowbrickc
694da02823
Rename childBindings to bindings.
2019-01-24 13:47:20 +01:00
yellowbrickc
e17d319d31
Remove try-catch (cannot be tested), even the logger is minimal configured, the method works.
2019-01-21 20:39:08 +01:00
yellowbrickc
52ae8cac8e
Create a method to retrieve all current bindings.
...
Expose it in the prototype.
Extend the docs.
2019-01-21 16:40:19 +01:00
yellowbrickc
1246ac4908
Revert "Remove the new symbol and the reference Rename the method for child bindings"
...
This reverts commit 1569e465
2019-01-21 15:07:00 +01:00
yellowbrickc
ede794c3ff
Revert "Remove the new symbol and the reference Rename the method for child bindings"
...
This reverts commit 1569e465
2019-01-21 15:00:19 +01:00
yellowbrickc
1569e46548
Remove the new symbol and the reference
...
Rename the method for child bindings
2019-01-20 17:55:12 +01:00
yellowbrickc
d8e9847c38
Expose tools.getChindings()
...
Register a symbol for the method
Reference the method in prototype
2019-01-20 17:18:04 +01:00
Nathan Woltman
4b5db2756c
Convert -Infinity to null ( #520 )
2018-09-24 23:57:47 +02:00
Matteo Collina
aa0bd756fa
Convert NaN and Infinity to null. ( #519 )
2018-09-24 17:33:08 +02:00
Arun Ranganathan
e870ff3811
Allow custom levels to override default and allow to remove default levels ( #515 )
2018-09-16 20:53:22 +02:00
Matteo Collina
faacff3510
Do not override opts if the destination is a string ( #513 )
...
Fixes #512 .
2018-09-03 14:33:29 +02:00
Matteo Collina
d3e3aff74a
Updated standard to v12. ( #506 )
2018-08-29 16:24:38 +02:00
Matteo Collina
8206a3d3f2
Support automatic destination with string. ( #472 )
2018-08-07 09:09:41 +02:00
Matteo Collina
d5f1ceffc9
Removed safe option ( #470 )
...
* Removed safe option
* Moved stringify from pino.js to lib/tools.js
2018-08-06 14:44:11 +02:00
Matteo Collina
c67fd1a63f
Merge branch 'master' into update-from-master
2018-08-05 13:08:49 +02:00
Matteo Collina
e7f9471a13
Improve performance of depth benchmark by 20%
2018-08-02 23:03:10 +02:00
davidmarkclements
e76946a801
100% coverage
2018-07-08 20:39:42 +02:00
davidmarkclements
86d8771696
rename .pino to .version, add .version to export
2018-07-08 18:57:06 +02:00
davidmarkclements
a605b561ce
tests: listen for data event instead of custom stream approach
2018-06-15 18:44:22 +02:00
davidmarkclements
1e27933673
tests: break the async/await barrier
2018-06-15 17:54:20 +02:00
davidmarkclements
c571b2dc10
tests: modernize assignments
2018-06-15 17:54:13 +02:00
davidmarkclements
2091136ec2
tests: modernize dependency and init var syntax
2018-06-15 17:54:03 +02:00