48dda23554
refs https://github.com/TryGhost/Toolbox/issues/501
- this reverts commit f2116357b7
- something with Elasticsearch is causing high CPU usage, so this commit
reverts that for now
25 lines
678 B
JavaScript
25 lines
678 B
JavaScript
const config = require('./core/shared/config');
|
|
const ghostVersion = require('@tryghost/version');
|
|
|
|
// Config for logging
|
|
const loggingConfig = config.get('logging') || {};
|
|
|
|
if (!loggingConfig.path) {
|
|
loggingConfig.path = config.getContentPath('logs');
|
|
}
|
|
|
|
// Additional values used by logging
|
|
loggingConfig.env = config.get('env');
|
|
loggingConfig.domain = config.get('url');
|
|
|
|
// Config for metrics
|
|
loggingConfig.metrics = config.get('logging:metrics') || {};
|
|
loggingConfig.metrics.metadata = {
|
|
// Undefined if unavailable
|
|
siteId: config.get('hostSettings:siteId'),
|
|
domain: config.get('url'),
|
|
version: ghostVersion.original
|
|
};
|
|
|
|
module.exports = loggingConfig;
|