request param to log
This commit is contained in:
@@ -56,7 +56,7 @@ class Config {
|
||||
return el != null;
|
||||
})
|
||||
if (this.requires.length) {
|
||||
logger.debug('Process terminated invalid required arguments: ', JSON.stringify(requires))
|
||||
logger.debug('Process terminated invalid required arguments: ', JSON.stringify(this.requires))
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
8
index.js
8
index.js
@@ -12,13 +12,17 @@ logger.getContext = function getContext() {
|
||||
return {
|
||||
// hostname: hostname,
|
||||
// pid: process.pid,
|
||||
port: port,
|
||||
app: 'Headless'
|
||||
// port: port,
|
||||
app: 'Browser'
|
||||
};
|
||||
}
|
||||
var app = express();
|
||||
app.use(express.json());
|
||||
app.use(expressLogging(logger));
|
||||
app.use((req, res, next) => {
|
||||
logger.debug(Object.assign(req.body, req.query, req.params), 'Request params')
|
||||
next()
|
||||
})
|
||||
app.listen(port, () => {
|
||||
logger.info({ app: 'Headless browser' }, 'Startup');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user