Skip to content

Commit

Permalink
Add commented out logging serialization code
Browse files Browse the repository at this point in the history
  • Loading branch information
joelpurra committed Jan 20, 2018
1 parent 540a66f commit b2fdcee
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/util/pino-logger.js
Expand Up @@ -41,6 +41,8 @@ export default class PinoLogger {
this._loggingMethods.forEach(
(loggingMethod) => {
this[loggingMethod] = (...args) => this._parentPinoLogger[loggingMethod]({
// TODO: serialize error objects etcetera.
// args: this._serialize(args),
args: args,
});
}
Expand All @@ -62,4 +64,17 @@ export default class PinoLogger {

return childLogger;
}

// _valueReplacer(/* eslint-disable no-unused-vars */key/* eslint-enable no-unused-vars */, value) {
// if (value !== null && typeof value === "object" && value.stack) {
// return value.toString();
// }
//
// return value;
// }
//
// _serialize(value) {
// // TODO: serialize error objects etcetera.
// return JSON.stringify(value, this._valueReplacer.bind(this), 2);
// }
}

0 comments on commit b2fdcee

Please sign in to comment.