windshaft logger by config param
This commit is contained in:
parent
dd5825c770
commit
db03bcdf8f
@ -87,6 +87,7 @@ var config = {
|
|||||||
// there, in append mode. Otherwise stdout is used (default).
|
// there, in append mode. Otherwise stdout is used (default).
|
||||||
// Log file will be re-opened on receiving the HUP signal
|
// Log file will be re-opened on receiving the HUP signal
|
||||||
,log_filename: undefined
|
,log_filename: undefined
|
||||||
|
,log_windshaft: true
|
||||||
// Templated database username for authorized user
|
// Templated database username for authorized user
|
||||||
// Supported labels: 'user_id' (read from redis)
|
// Supported labels: 'user_id' (read from redis)
|
||||||
,postgres_auth_user: 'development_cartodb_user_<%= user_id %>'
|
,postgres_auth_user: 'development_cartodb_user_<%= user_id %>'
|
||||||
|
@ -87,6 +87,7 @@ var config = {
|
|||||||
// there, in append mode. Otherwise stdout is used (default).
|
// there, in append mode. Otherwise stdout is used (default).
|
||||||
// Log file will be re-opened on receiving the HUP signal
|
// Log file will be re-opened on receiving the HUP signal
|
||||||
,log_filename: 'logs/node-windshaft.log'
|
,log_filename: 'logs/node-windshaft.log'
|
||||||
|
,log_windshaft: true
|
||||||
// Templated database username for authorized user
|
// Templated database username for authorized user
|
||||||
// Supported labels: 'user_id' (read from redis)
|
// Supported labels: 'user_id' (read from redis)
|
||||||
,postgres_auth_user: 'cartodb_user_<%= user_id %>'
|
,postgres_auth_user: 'cartodb_user_<%= user_id %>'
|
||||||
|
@ -87,6 +87,7 @@ var config = {
|
|||||||
// there, in append mode. Otherwise stdout is used (default).
|
// there, in append mode. Otherwise stdout is used (default).
|
||||||
// Log file will be re-opened on receiving the HUP signal
|
// Log file will be re-opened on receiving the HUP signal
|
||||||
,log_filename: 'logs/node-windshaft.log'
|
,log_filename: 'logs/node-windshaft.log'
|
||||||
|
,log_windshaft: true
|
||||||
// Templated database username for authorized user
|
// Templated database username for authorized user
|
||||||
// Supported labels: 'user_id' (read from redis)
|
// Supported labels: 'user_id' (read from redis)
|
||||||
,postgres_auth_user: 'cartodb_staging_user_<%= user_id %>'
|
,postgres_auth_user: 'cartodb_staging_user_<%= user_id %>'
|
||||||
|
@ -87,6 +87,7 @@ var config = {
|
|||||||
// there, in append mode. Otherwise stdout is used (default).
|
// there, in append mode. Otherwise stdout is used (default).
|
||||||
// Log file will be re-opened on receiving the HUP signal
|
// Log file will be re-opened on receiving the HUP signal
|
||||||
,log_filename: '/tmp/node-windshaft.log'
|
,log_filename: '/tmp/node-windshaft.log'
|
||||||
|
,log_windshaft: true
|
||||||
// Templated database username for authorized user
|
// Templated database username for authorized user
|
||||||
// Supported labels: 'user_id' (read from redis)
|
// Supported labels: 'user_id' (read from redis)
|
||||||
,postgres_auth_user: 'test_windshaft_cartodb_user_<%= user_id %>'
|
,postgres_auth_user: 'test_windshaft_cartodb_user_<%= user_id %>'
|
||||||
|
@ -83,10 +83,11 @@ module.exports = class ApiRouter {
|
|||||||
const metadataBackend = cartodbRedis({ pool: redisPool });
|
const metadataBackend = cartodbRedis({ pool: redisPool });
|
||||||
const pgConnection = new PgConnection(metadataBackend);
|
const pgConnection = new PgConnection(metadataBackend);
|
||||||
|
|
||||||
|
const windshaftLogger = environmentOptions.log_windshaft ? global.log4js.getLogger('[windshaft]') : null
|
||||||
const mapStore = new windshaft.storage.MapStore({
|
const mapStore = new windshaft.storage.MapStore({
|
||||||
pool: redisPool,
|
pool: redisPool,
|
||||||
expire_time: serverOptions.grainstore.default_layergroup_ttl,
|
expire_time: serverOptions.grainstore.default_layergroup_ttl,
|
||||||
logger: global.log4js.getLogger('[windshaft]')
|
logger: windshaftLogger
|
||||||
});
|
});
|
||||||
|
|
||||||
const rendererFactory = createRendererFactory({ redisPool, serverOptions, environmentOptions });
|
const rendererFactory = createRendererFactory({ redisPool, serverOptions, environmentOptions });
|
||||||
|
Loading…
Reference in New Issue
Block a user