mirror of
https://github.com/appium/appium.git
synced 2026-04-29 06:50:56 -05:00
Use morgan(format, options) function signature.
This commit is contained in:
committed by
Payman Delshad
parent
5a7602df7e
commit
b0a0e3d58e
+2
-2
@@ -107,14 +107,14 @@ var main = function (args, readyCb, doneCb) {
|
||||
// not "Gb"). Using 1GB because..., well because it's arbitrary and 1GB is sufficiently large for 99.99%
|
||||
// of testing scenarios while still providing an upperbounds to reduce the odds of squirrelliness.
|
||||
rest.use(bodyParser.json({limit: '1gb'}));
|
||||
rest.use(morgan({format: function (tokens, req, res) {
|
||||
rest.use(morgan(function (tokens, req, res) {
|
||||
// morgan output is redirected straight to winston
|
||||
var data = '';
|
||||
try {
|
||||
if (req.body) data = JSON.stringify(req.body).substring(0, 1000);
|
||||
} catch (ign) {}
|
||||
logger.info(requestStartLoggingFormat(tokens, req, res), data.grey);
|
||||
}, immediate: true}));
|
||||
}, {immediate: true}));
|
||||
|
||||
rest.use(methodOverride());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user