From 2536b57225a2a4fc7632c7d3302a98ce470e9601 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Thu, 21 Feb 2019 18:05:53 -0800 Subject: [PATCH] feat(logger): Use dbclient name functionality This allows distinguishing which logger output lines correspond to which importer during an import. Connects https://github.com/pelias/dbclient/issues/101 # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch dbclient-name # Changes to be committed: # modified: bin/cli.js # modified: package.json # --- lib/tasks/import.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/import.js b/lib/tasks/import.js index 84decb06..16df1c50 100644 --- a/lib/tasks/import.js +++ b/lib/tasks/import.js @@ -10,7 +10,7 @@ var peliasDocGenerator = require('../streams/peliasDocGenerator'); var overrideLookedUpLocalityAndLocaladmin = require('../streams/overrideLookedUpLocalityAndLocaladmin'); module.exports = function( sourceStream, endStream ){ - endStream = endStream || dbclient(); + endStream = endStream || dbclient({name: 'geonames'}); return sourceStream.pipe( geonames.pipeline ) .pipe( featureCodeFilterStream.create() ) diff --git a/package.json b/package.json index d96aeda1..e4b4a334 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "mkdirp": "^0.5.1", "pelias-blacklist-stream": "^1.0.0", "pelias-config": "^3.3.0", - "pelias-dbclient": "^2.5.6", + "pelias-dbclient": "^2.8.0", "pelias-logger": "^1.2.1", "pelias-model": "^5.7.1", "pelias-wof-admin-lookup": "^5.0.0",