Skip to content

Commit 5ca05e9

Browse files
committed
Merge pull request brianc#151 from cosbynator/master
Expose a pass-through a logger for generic-pool and bump dependency version
2 parents 0fcf709 + ae88278 commit 5ca05e9

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

lib/defaults.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ module.exports = {
1414
//number of rows to return at a time from a prepared statement's
1515
//portal. 0 will return all rows at once
1616
rows: 0,
17+
18+
// binary result mode
19+
binary: false,
1720

21+
//Connection pool options - see https://github.com/coopernurse/node-pool
1822
//number of connections to use in connection pool
1923
//0 will disable connection pooling
2024
poolSize: 10,
@@ -26,6 +30,6 @@ module.exports = {
2630
//frequeny to check for idle clients within the client pool
2731
reapIntervalMillis: 1000,
2832

29-
// binary result mode
30-
binary: false
33+
//pool log function / boolean
34+
poolLog: false
3135
}

lib/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ PG.prototype.connect = function(config, callback) {
6969
},
7070
max: defaults.poolSize,
7171
idleTimeoutMillis: defaults.poolIdleTimeout,
72-
reapIntervalMillis: defaults.reapIntervalMillis
72+
reapIntervalMillis: defaults.reapIntervalMillis,
73+
log: defaults.poolLog
7374
});
7475
return pool.acquire(cb);
7576
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"author" : "Brian Carlson <brian.m.carlson@gmail.com>",
1111
"main" : "./lib",
1212
"dependencies" : {
13-
"generic-pool" : "1.0.9"
13+
"generic-pool" : "1.0.12"
1414
},
1515
"scripts" : {
1616
"test" : "make test-all connectionString=pg://postgres@localhost:5432/postgres",

0 commit comments

Comments
 (0)