Skip to content

Commit

Permalink
feat: Merge pull request #63 from pelias/suspect-records-printing
Browse files Browse the repository at this point in the history
Add config options for suspect log
  • Loading branch information
orangejulius authored Aug 19, 2016
2 parents cd0fd28 + 179cfa6 commit abda872
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/lookupStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ var regions = require('../data/regions');
var peliasLogger = require( 'pelias-logger' );
var getAdminLayers = require( './getAdminLayers' );

var logger = peliasLogger.get( 'wof-admin-lookup', {
transports: [
new peliasLogger.winston.transports.File( {
filename: 'suspect_wof_records.log',
timestamp: false
})
]
});
//defaults to nowhere
var optsArg = {
transports: []
};
//only prints to suspect records log if flag is set
if (peliasConfig.logger.suspectFile === true){
optsArg.transports.push(new peliasLogger.winston.transports.File( {
filename: 'suspect_wof_records.log',
timestamp: false
}));
}

var logger = peliasLogger.get( 'wof-admin-lookup', optsArg );

countries.isSupported = function(country) {
return this.hasOwnProperty(country);
Expand Down

0 comments on commit abda872

Please sign in to comment.