Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

joyent/node-workflow#66: Allow passing Bunyan instances alternatively…

… to Bunyan config.
  • Loading branch information...
commit b281008c78b53027e43b705fcc35220c952a88e4 1 parent 19e1de7
@kusor authored
Showing with 18 additions and 15 deletions.
  1. +16 −13 lib/workflow-pg-backend.js
  2. +2 −2 package.json
View
29 lib/workflow-pg-backend.js
@@ -13,22 +13,25 @@ var sprintf = util.format;
var WorkflowPgBackend = module.exports = function (config) {
WorkflowBackend.call(this);
+ if (config.log) {
+ this.log = config.log.child({component: 'wf-pg-backend'});
+ } else {
+ if (!config.logger) {
+ config.logger = {};
+ }
- if (!config.logger) {
- config.logger = {};
- }
-
- config.logger.name = 'wf-pg-backend';
- config.logger.serializers = {
- err: Logger.stdSerializers.err
- };
+ config.logger.name = 'wf-pg-backend';
+ config.logger.serializers = {
+ err: Logger.stdSerializers.err
+ };
- config.logger.streams = config.logger.streams || [ {
- level: 'info',
- stream: process.stdout
- }];
+ config.logger.streams = config.logger.streams || [ {
+ level: 'info',
+ stream: process.stdout
+ }];
- this.log = new Logger(config.logger);
+ this.log = new Logger(config.logger);
+ }
this.config = config;
this.client = null;
};
View
4 package.json
@@ -2,7 +2,7 @@
"author": "Pedro Palazón Candel <kusorbox@gmail.com> (http://www.joyent.com)",
"name": "wf-pg-backend",
"description": "A backend for wf built over PostgreSQL",
- "version": "0.2.7",
+ "version": "0.2.8",
"homepage": "https://github.com/kusor/node-workflow-pg-backend",
"repository": {
"type": "git",
@@ -20,7 +20,7 @@
"bunyan": "0.6.8",
"async": "0.1.18",
"node-uuid": "1.3.3",
- "wf": "0.2.3"
+ "wf": "0.2.5"
},
"devDependencies": {
"tap": "0.2.0"
Please sign in to comment.
Something went wrong with that request. Please try again.