mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
3d989eba23
refs https://github.com/TryGhost/Toolbox/issues/354 - this commit turns the Ghost repo into a monorepo so we can bring our internal packages back in, which makes life easier when working on Ghost
25 lines
674 B
JavaScript
25 lines
674 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.safe
|
|
};
|
|
|
|
module.exports = loggingConfig;
|