Add more logs

This commit is contained in:
cgonzalez 2021-03-19 12:01:22 +00:00
parent b9d7cb7cb6
commit 12cd59f3bd
2 changed files with 11 additions and 5 deletions

View File

@ -1,7 +1,7 @@
'use strict';
const serverOptions = require('./../../server-options');
const { logger } = serverOptions();
var serverOptions = require('./../../server-options');
var { logger } = serverOptions();
var crypto = require('crypto');
var step = require('step');
var fs = require('fs');
@ -95,7 +95,7 @@ OgrFormat.prototype.toOGR = function (options, outFormat, outFilename, callback)
step(
function fetchColumns () {
logger.info({custom: true}, 'Getting dataset columns');
logger.info({ custom: true }, 'Getting dataset columns');
var colsql = 'SELECT * FROM (' + sql + ') as _cartodbsqlapi LIMIT 0';
pg = new PSQL(dbopts);
@ -108,6 +108,8 @@ OgrFormat.prototype.toOGR = function (options, outFormat, outFilename, callback)
throw err;
}
logger.info({ custom: true }, 'FindSRS');
var needSRS = that._needSRS;
columns = result.fields
@ -154,6 +156,8 @@ OgrFormat.prototype.toOGR = function (options, outFormat, outFilename, callback)
throw err;
}
logger.info({ custom: true }, 'Generating ogr2ogr parameters');
var next = this;
var ogrsql = 'SELECT ' + columns.join(',') + ' FROM (' + sql + ') as _cartodbsqlapi';
@ -244,6 +248,8 @@ OgrFormat.prototype.toOGR_SingleFile = function (options, fmt, callback) {
var ext = this._fileExtension;
var layername = options.filename;
logger.info({ custom: true }, 'Generating filename parameters');
var tmpdir = global.settings.tmpDir || '/tmp';
var reqKey = this.limitPathname([
fmt,

View File

@ -1,8 +1,8 @@
'use strict';
var Ogr = require('./../ogr');
const serverOptions = require('./../../../server-options');
const { logger } = serverOptions();
var serverOptions = require('./../../../server-options');
var { logger } = serverOptions();
function CsvFormat () {}