Ghost/ghost/core/loggingrc.js
Daniel Lockyer 48dda23554
Reverted "Added version information to log lines"
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
2023-01-17 13:20:47 +01:00

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;