0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/logging/index.js
Hannah Wolfe d979bd442e 🎨 Add support for short one-line log format (#7523)
refs #7116

- The long format logs were making it hard to see the debug statements
- Seeing headers for every asset is a bit much
- "short" format doesn't output bodyPretty
- This needs love as there's no reason to calculate bodyPretty if we aren't using it
- The default output should be discussed
- req.url doesn't include the full path when apps are mounted
- Use mode instead of format & pass config correctly
2016-10-10 16:17:16 +02:00

12 lines
476 B
JavaScript

var config = require('../config'),
GhostLogger = require('./GhostLogger'),
adapter = new GhostLogger({
env: config.get('env'),
mode: process.env.NODE_MODE || config.get('logging:mode'),
level: process.env.NODE_LEVEL || config.get('logging:level'),
transports: config.get('logging:transports'),
rotation: config.get('logging:rotation'),
path: config.get('paths:appRoot') + '/ghost.log'
});
module.exports = adapter;