mirror of
https://github.com/diced/zipline.git
synced 2025-04-11 23:31:17 -05:00
chore: hook request instead of reply for debug request logger
This commit is contained in:
parent
80c9a66705
commit
5016b154ca
1 changed files with 3 additions and 3 deletions
|
@ -80,12 +80,12 @@ async function start() {
|
|||
done();
|
||||
});
|
||||
|
||||
server.addHook('onResponse', (req, reply, done) => {
|
||||
server.addHook('onRequest', (req, reply, done) => {
|
||||
if (config.core.logger) {
|
||||
if (req.url.startsWith('/_next')) return done();
|
||||
|
||||
server.logger.child('response').info(`${req.method} ${req.url} -> ${reply.statusCode}`);
|
||||
server.logger.child('response').debug(
|
||||
server.logger.child('request').info(`${req.method} ${req.url} -> ${reply.statusCode}`);
|
||||
server.logger.child('request').debug(
|
||||
JSON.stringify({
|
||||
method: req.method,
|
||||
url: req.url,
|
||||
|
|
Loading…
Add table
Reference in a new issue