Skip to content

Commit 1759015

Browse files
committed
Enable logging for stub tests based on NEOLOGLEVEL environment variable
1 parent 2992d10 commit 1759015

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/internal/bolt-stub.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,11 @@ class StubServer {
114114
function newDriver(url, config = {}) {
115115
// left here for debugging purposes
116116
const logging = {
117-
level: 'debug',
117+
level: (process.env['NEOLOGLEVEL'] || 'error').toLowerCase(),
118118
logger: (level, msg) => console.log(`${level}: ${msg}`)
119119
};
120120
// boltstub currently does not support encryption, create driver with encryption turned off
121-
const newConfig = Object.assign({encrypted: 'ENCRYPTION_OFF'}, config);
122-
// use for logging enabled
123-
// const newConfig = Object.assign({encrypted: 'ENCRYPTION_OFF', logging}, config);
121+
const newConfig = Object.assign({ encrypted: 'ENCRYPTION_OFF', logging }, config);
124122
return neo4j.driver(url, sharedNeo4j.authToken, newConfig);
125123
}
126124

0 commit comments

Comments
 (0)