(MODE-11365) Added more logging.
This commit is contained in:
parent
48dfc82138
commit
5f095c217f
2 changed files with 4 additions and 4 deletions
|
|
@ -123,7 +123,7 @@ module.exports = function(options, repo, params, id, styles) {
|
||||||
isGzipped = false;
|
isGzipped = false;
|
||||||
}
|
}
|
||||||
data = shrinkers[style](data, z, tileJSON.maxzoom);
|
data = shrinkers[style](data, z, tileJSON.maxzoom);
|
||||||
//console.log(shrinkers[style].getStats());
|
console.log(shrinkers[style].getStats());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (options.dataDecoratorFunc) {
|
if (options.dataDecoratorFunc) {
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ module.exports = function(options, repo, params, id, dataResolver) {
|
||||||
ratio: ratio,
|
ratio: ratio,
|
||||||
request: function(req, callback) {
|
request: function(req, callback) {
|
||||||
var protocol = req.url.split(':')[0];
|
var protocol = req.url.split(':')[0];
|
||||||
//console.log('Handling request:', req);
|
console.log('Handling request:', req);
|
||||||
if (protocol == 'sprites') {
|
if (protocol == 'sprites') {
|
||||||
var dir = options.paths[protocol];
|
var dir = options.paths[protocol];
|
||||||
var file = unescape(req.url).substring(protocol.length + 3);
|
var file = unescape(req.url).substring(protocol.length + 3);
|
||||||
|
|
@ -177,7 +177,7 @@ module.exports = function(options, repo, params, id, dataResolver) {
|
||||||
format = parts[5].split('.')[1];
|
format = parts[5].split('.')[1];
|
||||||
source.getTile(z, x, y, function(err, data, headers) {
|
source.getTile(z, x, y, function(err, data, headers) {
|
||||||
if (err) {
|
if (err) {
|
||||||
//console.log('MBTiles error, serving empty', err);
|
console.log('MBTiles error, serving empty', err);
|
||||||
createEmptyResponse(sourceInfo.format, sourceInfo.color, callback);
|
createEmptyResponse(sourceInfo.format, sourceInfo.color, callback);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -214,7 +214,7 @@ module.exports = function(options, repo, params, id, dataResolver) {
|
||||||
var extension = path.extname(parts.pathname).toLowerCase();
|
var extension = path.extname(parts.pathname).toLowerCase();
|
||||||
var format = extensionToFormat[extension] || '';
|
var format = extensionToFormat[extension] || '';
|
||||||
if (err || res.statusCode < 200 || res.statusCode >= 300) {
|
if (err || res.statusCode < 200 || res.statusCode >= 300) {
|
||||||
// console.log('HTTP error', err || res.statusCode);
|
console.log('HTTP error', err || res.statusCode);
|
||||||
createEmptyResponse(format, '', callback);
|
createEmptyResponse(format, '', callback);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue