File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1- import bunyan from 'bunyan' ;
1+ import bunyan , { stdSerializers } from 'bunyan' ;
22
33// Safe console access for oldIE
44import console from 'console' ;
@@ -96,3 +96,6 @@ ClientLogger.prototype.child = function () {
9696BUNYAN_LOGGER_LEVELS . forEach ( ( level ) => {
9797 ClientLogger . prototype [ level ] = logForLevel ( level ) ;
9898} ) ;
99+
100+ // Expose bunyan stdSerializers
101+ ClientLogger . bunyanStdSerializers = stdSerializers ;
Original file line number Diff line number Diff line change 1- import bunyan from 'bunyan' ;
1+ import bunyan , { stdSerializers } from 'bunyan' ;
22import Rollbar from 'rollbar' ;
33import bunyanFormat from 'bunyan-format' ;
44
@@ -93,4 +93,5 @@ BUNYAN_LOGGER_LEVELS.forEach((level) => {
9393 NodeLogger . prototype [ level ] = logForLevel ( level ) ;
9494} ) ;
9595
96-
96+ // Expose bunyan stdSerializers
97+ NodeLogger . bunyanStdSerializers = stdSerializers ;
Original file line number Diff line number Diff line change 1- import bunyan from 'bunyan' ;
1+ import bunyan , { stdSerializers } from 'bunyan' ;
22import TestLogger from '../testLogger' ;
33
44// Require the package. For client tests, webpack should
@@ -15,6 +15,10 @@ describe('we-js-logger', () => {
1515 expect ( new Logger ( ) ) . to . be . ok ;
1616 } ) ;
1717
18+ it ( 'exposes "bunyanStdSerializers"' , ( ) => {
19+ expect ( Logger . bunyanStdSerializers ) . to . eql ( stdSerializers ) ;
20+ } ) ;
21+
1822 describe ( 'options' , ( ) => {
1923 it ( 'accepts a name' , ( ) => {
2024 const name = 'WeTest!' ;
You can’t perform that action at this time.
0 commit comments