2021-06-15 17:36:27 +03:00
|
|
|
const config = require('./core/shared/config');
|
2021-10-13 13:29:14 +03:00
|
|
|
const ghostVersion = require('@tryghost/version');
|
2017-01-23 14:04:01 +03:00
|
|
|
|
2021-06-15 17:36:27 +03:00
|
|
|
module.exports = {
|
2019-04-16 14:04:15 +03:00
|
|
|
name: config.get('logging:name'),
|
2017-01-23 14:04:01 +03:00
|
|
|
env: config.get('env'),
|
|
|
|
path: config.get('logging:path') || config.getContentPath('logs'),
|
2017-02-17 17:29:25 +03:00
|
|
|
domain: config.get('url'),
|
2017-01-23 14:04:01 +03:00
|
|
|
mode: config.get('logging:mode'),
|
|
|
|
level: config.get('logging:level'),
|
|
|
|
transports: config.get('logging:transports'),
|
2021-10-12 16:29:10 +03:00
|
|
|
metrics: {
|
|
|
|
transports: config.get('logging:metrics:transports'),
|
|
|
|
metadata: {
|
|
|
|
// Undefined if unavailable
|
|
|
|
siteId: config.get('hostSettings:siteId'),
|
2021-10-13 13:29:14 +03:00
|
|
|
domain: config.get('url'),
|
|
|
|
version: ghostVersion.safe
|
2021-10-12 16:29:10 +03:00
|
|
|
}
|
|
|
|
},
|
2019-04-16 14:04:15 +03:00
|
|
|
gelf: config.get('logging:gelf'),
|
2017-02-17 20:24:14 +03:00
|
|
|
loggly: config.get('logging:loggly'),
|
2021-02-25 18:50:58 +03:00
|
|
|
elasticsearch: config.get('logging:elasticsearch'),
|
2017-02-17 20:24:14 +03:00
|
|
|
rotation: config.get('logging:rotation')
|
2021-06-15 17:36:27 +03:00
|
|
|
};
|